Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Darkmax on November 28, 2013, 08:36:26 PM
-
Hi I'm having some issue with UIToggleObjects, I have setup a sample scene with some boxes and checkboxes, like on this image:
(http://s29.postimg.org/jd0jh50zn/uitoggleobjects_setup.jpg) (http://postimg.org/image/jd0jh50zn/)
Then I setup the script uitoggleobjects to when the first check box is checked, show box one, and hide all others except the first (this I do the same with the others but changing the box to show depending of the checkbox).
Also i put all the checkboxes in the same group (ex: 1), and I set the first checkbox to Starting State true.
Then I disable all the boxes and the panel.
Finally I hit play and enable the panel, and this happens:
(http://s29.postimg.org/efmyw0z0j/uitoggleobjects_problem.jpg) (http://postimg.org/image/efmyw0z0j/)
It suppose to hide all objects, with except of the first box, because that is checked true, but all the boxes with the exception of the last are showed.
I don't know why this is happening, if some one has a clue?
-
The way toggled objects script works is you only need to specify either enabled or disabled state, and rarely would you need to specify both if you have them set up as radio buttons.
So in your case if you have 1 checkbox per box, only specify the enabled object for each of them. When the checkbox state is set to off, your enabled object will automatically get disabled.
-
Thanks, now is working