void OnGUI(){
if(TimerScript.TimerCount > 0f)
{
GUI.backgroundColor = new Color(0,0,0,0);
BackToMain = GUI.Button (new Rect (Width,Height,WidthSize,HeightSize), PauseButtonGUI);
if(BackToMain)
{
Debug.Log("TRUE");
}
else
{
Debug.Log("FALSE");
}
}
Why when i press the button, it keeps being true for one frame? it shouldn’t be true until i press again to make it false?