Question by
unity_S0ZCLiVP1XXH-w · Jun 06, 2018 at 02:44 AM ·
c#scripting problembuttonmenuactivation
Problem with enabling menu
Hello, I cant make a menu... Generally my menu works except one thing. Button Resume works once. When I turn on my menu its all works, but when I turn off menu, I cant enable it again, button Pause just don't work! Help me please.. public GameObject Panel;
void Start()
{
Panel.SetActive(false);
}
public void Update()
{
if (CnInputManager.GetButton("Pause"))
{
Paused();
}
if (CnInputManager.GetButton("Resume"))
{
Resumed();
}
}
public void Resumed()
{
Time.timeScale = 1;
Panel.SetActive(false);
}
public void Paused()
{
if (Time.timeScale == 1)
{
Time.timeScale = 0;
}
Panel.SetActive(true);
}
}
Comment