Ok guys what am I doing wrong here? And what am I suppose to do?
Since I have over 60 levels so far where I need to drag and drop 3 in-scene gameobjects, two being textures and one being a gameobject, its gonna be a real bother doing it in each level with drag and drop. So how do I assign them with a script at start?
Here’s one of them, and the way I tried but nothing happened:
var fuelMeter : GUITexture;
function Start()
{
fuelMeter = GameObject.Find("FuelMeter/Fuel").GetComponent(GUITexture);
}
So the question is, how do I, by name, assign the GUITexture called Fuel, which is a child of FuelMeter, to the variable fuelMeter which is a GUITexture?