I have a bit of a problem… My Script won’t work at all! xD
I have it applied to my camera The whole Script is:
var Prefab : Transform;
function OnGui () {
if (GUI.Button(Rect(10,10,50,50),"Create")){
var gos : GameObject[];
gos = GameObject.FindGameObjectsWithTag("SetObject");
for (var g in gos){
if (g.GetComponent.<ControlObject>().isBuild);
Instantiate(Prefab, g.transform.position, Quaternion.identity);
}
}
}
I don’t see anything wrong with it… I even tested to see if it was working by putting: 'Application.Quit();'
in the start function and it still didn’t do anything once again i have this script on my camera. Anyone have a idea on what may be causing this?
Thanks if you can help!