"Set time scale to zero when menu is opened" caused the menu panel to be closed immediately

zzmingo

New member
When enabled "Set time scale to zero when menu is opened" checkbox, caused the menu panel to be closed immediately.
 
I just tried to replicate this in the demo scene but everything seems to work fine.

There is a known issue with the standard input manager that double clicks a keyboard input if you have a controller plugged in. This can cause the menu to open and close in the same frame since it is a toggle.
If you unplug the controller and restart unity it works again.
You can also use one of our integration with other input systems, like the new Unity Input System, that solves the issue.

That's the only thing I can think of that could be causing your issue.
If that's not it please let us know
 
Hi, thanks for your reply.

I am using an Xbox controller, haven't do anything with the keyboard. And use the Unity Input System integration.
It seems similar to your said case when I toggle the menu window, it just shows one frame and closes again.
 
That's odd, I never experienced that with the new Unity Input System.
And it only happens when the time scale is set to 0?

Could you add a Debug.Log in the ToggleMainMenu function of the DisplayPanelManager? This should give us an idea of where the issue could be coming from.

I'm afraid it might be a bug with our Input system. As soon as I have some time I will dig into this in more detail
 
Yes, only happens when the time scale is set to 0.I am trying to find what happened and the following is the log and some changes in code.


1618909383439.png1618909463271.png1618909479610.png
 
In another case that the inventory canvas opened fine but doesn't respond any input when the time scale is set to 0 and **InputType** set to Tap.
That's odd, I remember that UGUI is working with unscaled time mode by default.

1618910303055.png
 
Finally, I found a workaround.

Set the time scale to 0 delays to next frame by coroutine manually instead of using the time scale checkbox of Display Panel Manager.
And change the Update Mode of input settings to "process events in dynamic update", before it was "fixed update".

1618912219684.png
 
Interesting,
Thank you for looking into this in such detail. I'll see if I can find any other solution to this problem and I'll keep you up to date
 
Top