- Home /
 
 
               Question by 
               rowdyp · Mar 11, 2011 at 10:19 PM · 
                guiinstantiateprefab  
              
 
              prefab question
have a box of text that appears when I press a button, but I want to make this object disappear from the hierarchy in the inspector when I press the button and reappear when the button is pressed again, what is the best route to take to achieve this?
               Comment
              
 
               
              Answer by AngryOldMan · Mar 11, 2011 at 11:13 PM
better to just hide it. otherwise you would have to destroy and instantiate it everytime you press the button which is slightly longer and higher in processing power. something like
GameObject.active = false;
 
              okay thanks yeah I kind of figured that would be easier especially since it was only text
Your answer