Pause, resume and slow motion in Unity3D

Advertisemen

Let's take a look how to pause and resume scene in Unity3D.
Go ahead and crate two cubes in your scene [make sure in your scene some actions are going on so you can see the effect of pause and resume] and name them - Pause and Resume. Also, create two c# scripts name them what ever you want, I am going to name them - Pause and Resume and attached them respectively.

Now, in the Pause script type following -















And, in the Resume script type following -















If you want to things to slow down [e.g. gravity in your scene], type the following in your script -















amount of scale is varied on your need.
Now, go ahead and try, should work just fine.

Advertisemen

Disclaimer: Gambar, artikel ataupun video yang ada di web ini terkadang berasal dari berbagai sumber media lain. Hak Cipta sepenuhnya dipegang oleh sumber tersebut. Jika ada masalah terkait hal ini, Anda dapat menghubungi kami disini.

Tidak ada komentar:

Posting Komentar

© Copyright 2017 Tutorial Unity 3D