Author Topic: UIButton component is unchecked while i hit run in the editor  (Read 1760 times)

moghes

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
UIButton component is unchecked while i hit run in the editor
« on: January 14, 2014, 11:14:08 AM »
Hello,

I copied the "UI Root (2D)" from the scroll view examples scene, and pasted in my scene.
Did change the items, removed unnecessary labels/sprites and added UIButton component for each item.

After I hit run, I could hit the buttons(items) and then I realized in the Hierarchy that the UIButton component was disabled, did enable it manually and everything ran fluently and as I planned.

However there are ways to enable them back as I hit Play, but can you tell me what was happening ?

Or from start I should not copy paste the one in the examples and form my own scroll view?


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIButton component is unchecked while i hit run in the editor
« Reply #1 on: January 14, 2014, 09:46:11 PM »
What version of NGUI? UIButton won't disable itself.

And no, I wouldn't recommend you copy examples as you may end up copying certain things without understanding how they work. For example in the scroll view example the scroll view panel is marked as static, which means that its widgets will not react to transform changes.

moghes

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: UIButton component is unchecked while i hit run in the editor
« Reply #2 on: January 15, 2014, 03:49:39 AM »
I just updated to the latest, and still I have the UIButton disabling itself.

However I will follow the 40 minute tutorial "NGUI 3.0.7 Tutorial" where you explain scroll views, maybe I have a conflict due to the copy paste.

Thanks :)