Author Topic: Simple error: Adding a button using NGUI  (Read 1317 times)

musach21

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Simple error: Adding a button using NGUI
« on: September 22, 2014, 08:44:43 AM »
Hello:
I am new to Unity and NGUI. I am trying to do what I imagine is a very simple task of adding a button with which I can later trigger some events. I got instructions on how to do this online (see screenshot). But this does not work. When I try to drag the Control Button from my Assets into the Hierarchy pane it simply doesn't let me. (Cursor shows that "No Entry" looking sign as I try to drag it).
I am also meant to understand that I can simply drag the Control Button from the project view on to my scene but I get similar results as above.

Console does show errors the errors shown in the screenshot below
« Last Edit: September 22, 2014, 08:50:50 AM by musach21 »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Simple error: Adding a button using NGUI
« Reply #1 on: September 22, 2014, 10:35:13 AM »
The error is a Unity hierarchy window error, so not sure how it's related.

You seem to have two maroon rectangles there, implying two panels. Why? Here try this simple test:

1. New scene.
2. Drag in a button from the Prefab Tool.

Note that I didn't even create a UI Root beforehand? It's created automatically when you create your first UI element.