|
I loop through all the children components inside a GO.
What i want to do is to create a GUI.Toggle for each GO's children inside the loop. Is that possible? Thank you in advance.
(comments are locked)
|
|
Unless the children of the gameobject can change during runtime, I'd recommend getting and storing the list of children in Start(), then looping through the array in your OnGUI method.
(excuse the hard-coded rect values there - you'll probably want to modify those!) Thank you!! I wonder if the GUI.Toggle has a callback function. Cause now i want to toggle the texture of each children.
Mar 11 '10 at 11:35 AM
chchrist
(comments are locked)
|
