- Home /
Question by
Mattivc · Jan 01, 2010 at 04:55 PM ·
guiguitexture
Disable a object
I want to disable a GUITexture object and later enable it. How do i do this using JavaScript?
Comment
I removed the javascriptspecific tag. Though you ask for a solution in Javascript, the question and answer is relevant regardless of language choice.
Best Answer
Answer by flaminghairball · Jan 01, 2010 at 05:27 PM
guiTexture.gameObject.active = false; //turn it off
guiTexture.gameObject.active = true; //turn it on
What if i want to disable a GUITexture other than the one the script is connected to?
Just replace "guiTexture" with the texture you want to disable...