Problem is not reproducible or outdated
Problem with 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);
}
}
Answer by tormentoarmagedoom · Jun 06, 2018 at 10:28 AM
Good day.
I'm not sure, but if you set timeScale to 0, Update is still executed, but maybe InputManager dont... so, maybe you should create a simple (Input.KeyCode) to detect when to restart the game...
Or something like this. Thry to do it by another way.
Bye
I did what you said, you are right. This because of Input $$anonymous$$anager, but what can I do? this project for android so I need input manager. Can you advise me another solution? I will be grateful for any help
Follow this Question
Related Questions
Raw Image changing texture in inspector but not in game. 1 Answer
how do i take whats on one UI canvas and make it apear on another in real time(for a card game) 0 Answers
SetActive(false) in Start does not seem to work 2 Answers
How to run a script twice in a scene 2 Answers
Pause menu done exactly according to tutorial doesen't work 2 Answers