ok so I am trying to make it so when I aim my crosshair goes away but I cant quite get it here is my code
var crosshairTexture : Texture2D; var position : Rect; static var OriginalOn = true; function Start() { position = Rect((Screen.width - crosshairTexture.width) / 2, (Screen.height - crosshairTexture.height) /2, crosshairTexture.width, crosshairTexture.height); } function Update() { if (Input.GetButton("Fire2")) { crosshairTexture == false; } else if (Input.GetButton("Fire2")) { crosshairTexture == true; } } function OnGUI() { if(OriginalOn == true) { GUI.DrawTexture(position, crosshairTexture); } }
please tell me what I need to fix. Thank You.