Prefab question (16563)

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?

1 Answer

1

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