How to make unity3d stop for seconds?

Hi guys, i’m developing a simulation app and want the entire “game” to stop for 1 second, how can i do this? :face_with_spiral_eyes:

Are you are looking for something like Time.timeScale?

Does it affect the Update calls? The reference is little sparse

It affects anything dealing with the physics engine. It will not affect anything dealing directly with time, like Time.deltaTime.

When you set Time.timeScale to zero, all the physics will stop in the game. All things that reference Time.deltaTime should be multiplied then by Time.timeScale. This will effectively stop time in the game. (This is for the things that you want to stop)

Thanks but im looking for a way to make my entire app runs at 1FPS without freezing it using While loops to do so.

Why would you want to do that? Thats a slow and glitchy framerate right there. Time.timeScale only makes the physics engine stop, not anything else. You can do that for 1 second with an if statement. :slight_smile:

Its a simulation, if i run it with normal settings the entire process will take less than one second, and i want to look at it while it happens.

Record a screen video, and then play back in super slo mo?

I dont think that would even work

At least i laughed

Run your simulation in a coroutine with yield WaitForSeconds(1)

Thats what i’m here for

Thanks! That will for sure do

Sounds like you found a much better approach haha.
But to do what sounds like you originally were asking for:

System.Threading.Thread.Sleep(1000);