- Home /
Problem with gameObject Array
Hi there!
I am trying to disable gameobject and its children that I have defined in inspector. It seems that I am (again) doing it wrong, but I cant figure how I should do this.
var BigIcons : GameObject[];
function Start(){
BigIcons[2].SetActiveRecursively(false);
}
Any ideas how I should do this?
Answer by Eric5h5 · Jan 16, 2012 at 01:13 PM
There's nothing wrong with that code; it works as expected.
It did not give me an error, but it did not disable the object set in the inspector either. I've tried this multiple times, but with no success.
EDIT: It seems that everything works perfectly after reboot. Should have tried that before posting question.
I apologize.
Thank you for your help!
Your answer
Follow this Question
Related Questions
How to disable an array of projectors 2 Answers
How Do i Enable an Object and then Disable it? 1 Answer
enable / disable a script without dynamic typing 2 Answers
How do I disable a wind zone through script? 2 Answers
What's the difference between activate/deactivate & enable/disable game objects? 1 Answer