Hello i am trying to access a GUITexture component on another object, from my player. Ive tried several different ways that failed miserably. I Have to be able to find the object in my scene because the player spawns into the scene. The player has a script on it that needs to be able to access the GUITexture component on another gameObject in the scene.
Try this:
var yourOBJ: GameObject; var texture1; //Var to hold texture function Update(){ GameObject.FindGameObjectWithTag ("yourObjTag"); texture1 = yourOBJ.GetComponent(GUITexture); }