- Home /
Time.timeScale = 0; only pauses animations?
ok so im trying to pause game when scene starts. and was told Time.timeScale = 0; would pause it. but it don't. if i do Time.timeScale = 0.0000001; then it will pause everything. why is this happening to me?
Answer by XienDev · Apr 08, 2013 at 06:15 AM
To pause all physics and all movement in your game, you have to use Time.deltaTime in your scripts. It would be equal proportional to your framerate and your timescale http://docs.unity3d.com/Documentation//ScriptReference/Time-deltaTime.html
Answer by Nidre · Apr 08, 2013 at 06:06 AM
Time.timeScale affects eveything releated with timeScale.
In your situation you can create a coroutine and return 1 yeild before setting timescale to 0.
Something like that. (I have written it with notepad so there might be syntax errors.But the logic should be the same.) Hope this helps. :)
IEnumarator WaitAndPause()
{
yield return null;
Time.timeScale = 0;
}
void Start()
{
StartCorotuine("WaitAndPause");
}
Your answer
Follow this Question
Related Questions
Animations ignore TimeScale 8 Answers
Timescale wont work 0 Answers
How to enable UI collision while timeScale is 0? 2 Answers
Pause menu... Isn't pausing everything... 1 Answer
How to Appease a pause menu in a game that changes it's time scale? 1 Answer