I'm trying to setup a simple hide and unhide gameobject in Unity, but can't seem to get my coding to work correctly. What wrong with what I have written so far.
#pragma strict
public var myObject :GameObject;
if (GUI.Button(new Rect(1120,930,100,50),"3D MODEL"))
{
gameObject.SetActive(true);
}
}