Hi,
I would have a question about GameObject.FindWithTag, i actually have a Gaze script, and on gaze out, i want to input a smallest as possible script to activate or desactivate an object with a spécial tag
the script :
void OnGazeEnd ()
{
base.OnGazeEnd ();
GameObject[] tv = GameObject.FindGameObjectsWithTag("TV1");
for (int i = 0; i < tv.Length; i++)
tv*.GetComponent<Renderer>().enabled = false;*
-
SetNormalTexture ();*
-
}*
I tried with this GameObject[] without any success!
But some simple things like :
Destroy (GameObject.FindWithTag(“TV1”));
works perfectly! badly i dont want to destroy it
Is anyone have an idea? so i can enable or disable any object whenever this script is used.
Thank you very much