Okay all i want is that when i hit the toggle button a camera activates, when i untick the toggle button, it deactivates the camera here is the code i tryed ?
var camera: Transform;
var showMap = false;
var xAxis : int;
var yAxis : int;
function Start()
{
camera.enabled = false; // hide it
}
function OnGUI()
{
showMap = (GUI.Toggle (Rect (xAxis, yAxis, 100, 20), showMap, “Map”));
camera.enabled = showMap;
}
Thanks