Hello Everyone,
I’m trying to disable a GUI button while my left mouse button is down and dragging. I made this script but is not working.
Any idea what is wrong?
Thanks in advance!
static var showOff : int;
var Skin_360 : GUISkin;
var button360 = true;
function OnGUI(){
GUI.enabled = button360 ;
GUI.skin = Skin_360;
if (GUI.Button(Rect(365,490,150,90),"")){
}
if (Input.GetButtonDown("Fire1")){
button360 = false;
showOff = 1;
}else{
button360 = true;
showOff = 0;
}
}