Author Topic: UIToggle & UIToggled Objects - Bug (FIXED)  (Read 3093 times)

bawheed

  • Guest
UIToggle & UIToggled Objects - Bug (FIXED)
« on: December 11, 2013, 09:09:44 AM »
Hello

There appears to be a bug when using the 'UIToggle' & 'UIToggled Objects' scripts together.

When I add a forth (or more) Toggle Button to the list of buttons within the same Toggle Group.
Then activate the Starting State of my first button.
When I press play, the Activated and Deactivated gameObjects within the 'UIToggled Objects' script, behave in a completely random/unexpected way on startup.  All then works as expected when one of the buttons have been pressed within the toggle group.  This unexpected pattern also happens with the 'Starting State' set on the second and forth buttons within the toggle group.

If I set the 'Starting State' to the third button in the list, the Toggled Objects behave as expected on startup.

Now If i scale this up to 10 buttons in the list, the ninth button works fine and the others behave unexpectedly.
It appears to be the second last toggle button within the asset list which works fine.

Are you aware of this problem and do you have a fix/work around for this?

Cheers

Kev




« Last Edit: December 12, 2013, 04:03:37 AM by bawheed »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIToggle & UIToggled Objects - Bug
« Reply #1 on: December 12, 2013, 01:55:18 AM »
Most common cause is specifying both activated and deactivated states.

Don't do this.

Specify on what should be activated for each toggle. The deactivated action is set automatically.

bawheed

  • Guest
Re: UIToggle & UIToggled Objects - Bug
« Reply #2 on: December 12, 2013, 04:03:03 AM »
Brilliant!

That just made my job a whole lot easier!


Cheers

K