x


How do I pause and unpause my game on the iPhone?

How do I pause my scene in Unity IOS like what method would I use to get this to happen?

I need the help on how to pause just one scene and have that scene paused for a certain amount of time

more ▼

asked Jan 20 '11 at 04:25 PM

AtomicMarine gravatar image

AtomicMarine
504 42 48 70

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

There are an infinite number of custom methods you can employ, but the easiest is setting Time.timeScale to a very low value. This is not an iOS-specific question at all, so you can easily find information about it.

http://answers.unity3d.com/questions/2393/freeze-game-using-time-timescale-0-wait-3-secs-and-resume-play-automatically

Personally, I implement event handlers in all my scripts that need to have some pause/unpause functionality. When those events happen, I stop or resume behavior as desired.

more ▼

answered Jan 20 '11 at 04:35 PM

Jessy gravatar image

Jessy
15.6k 72 95 196

I need it to pause for a certain amount of seconds... so Time Scale is hurting that a bit

Jan 20 '11 at 04:40 PM AtomicMarine

Hi Dominic, As Jessy suggested, instead of using TimeScale, you can manually create methods that stop your object's movement on demand. Also, you can use Coroutines to delay the amount of time you want. Or use http://unity3d.com/support/documentation/ScriptReference/Time-realtimeSinceStartup.html

Jan 20 '11 at 04:47 PM Thom Denick

I edited the answer. I thought WaitForSeconds would be helpful to you, but didn't know that was dependent on timeScale. Shows how much I use timeScale. :-P

Jan 20 '11 at 05:23 PM Jessy

Thanks All got it working using the WaitForSeconds :) Thanks Jessy

Jan 20 '11 at 09:26 PM AtomicMarine
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3719
x1999
x1953
x260

asked: Jan 20 '11 at 04:25 PM

Seen: 2309 times

Last Updated: Jan 20 '11 at 04:25 PM