Hi I’m trying to set a GUI button to triggerGo = 0; Because I’m using a Static Variable to enable a script in other object.
So a need to use the same button, But when I hit the button its only makes “triggerGo == 1”
so I can’t disable the script in my other object.
Here you can see my script
Any advice?
Thanks in advance!
function OnGUI (){
GUI.skin = Skin_power;
if (GUI.Button(Rect(870,227,80,56),"")){
audio.PlayOneShot(beep);
triggerGo = 1;
print(triggerGo);
}