Im new to Unity, and i got a small problem.
Imagine i have a square, on which another gameobject should become visible after i click on that gameobject. It should however only happen once, and on the second click it should do nothing.
I can create the object on a click, but how can i store the fact that the gameobject has been clicked already, so it wont create a new gameobject on every click. What i would like is for example a variable named "inUse" attached to every GameObject, which can have the value true or false. Ofcourse, when a new gameobject gets created it should be set to false.
I think, i need to add a new component or something to the gameobject that keeps track of this, but i cant seem to do that ;)
I hope someone can help.
Thanks in advance.