Player does not move anymore when game is paused (Time.timeScale = 0) and resumed (Time.timeScale = 1)
Hi everyone. I'm developing a 2d mobile game in C# and I recently created a pause menu using Time.timeScale. I'm using a virtual touch joystick (the one that comes with the Standard Asset CrossPlatformInput) to move the player, but when I resume the game (by setting Time.timeScale back to 1), the player does not move anymore... Does anyone knows how to fix that?
Do you think the cause is something with Unity or your code?
If you think it's Unity, you should be able to reproduce it in a simple script that clearly shows the problem.
If you think it's your code, you'll need to start doing things like using Debug.Log to make sure (for example) the timeScale really is still 1 and that your control events are still firing.
Once you know what the problem with your code is, fixing it will be almost trivial.
I think it's something with Unity... I found that other persons asked that question on different forums, so I'm not the only one with this problem, but no one's got the answer...
So do the basic diagnostic stuff. Take your code and make a copy. Start removing pieces until you have something that reproduces the problem and only reproduces the problem, with as few unrelated pieces as possible. Then, file a bug and share the link to the bug, here.
Your answer
Follow this Question
Related Questions
My object disappears when being dragged through the screen 0 Answers
Unity 2D Controller when active ignore another click 0 Answers
Unity 2d android game How to "freeze" position on Y axis 1 Answer
how create EndLess game Like zombie Tsunami 1 Answer
problim with dontdestroyonload and counts death as 2 0 Answers