Hey guys, I am making a TD game and I want to implement a fast forward feature like in http://fieldrunners.com/
the Time.timeScale has no effecting on my game. I have some enemies moving some point in every Update() call in a separate script . I have used the following code:
void Update () {
if(Input.GetButtonUp("Jump")){
Time.timeScale = 1.0f -Time.timeScale;
Debug.Log(Time.timeScale);
}
Time.timeScale changed but it is not effecting the enemy movements. Can anyone help me with this. Thnx
im not a pro but wouldnt this code pause the game? since i think ur making Time.timeScale - 0 if im assuming the current timeScale is 1.
anyway since im using this function to pause my game i tested just after changing just one number making:
Time.timeScale = 2;
(for double the game speed)
Time.timeScale = 1;
(for original game speed)
Time.timeScale = 0;
(to pause game(beware if functions still works when paused for example in a fps u can still instantiate a bullet if mouse was clicked and stuff like that, so u can say: )
if (whatever && (Time.timeScale != 0))
to get around this problem.)
i gave it a quick test and it worked fine.
ah sry didnt see the last comment… um maybe the variable for the enemy’s movement is a static number so when u double the speed u’ll need to change enemies’ speed as well i guess
Time.timScale doesn’t work for Update(), I have changed my enemy script to FixedUpdate() and it is working fine 
Maybe currently accepted answer worked in older version of Unity(2011), but if you look at Time.timeScale docs you’ll see that it does not affect fixedUpdate (fixedDeltaTime).
To speed up your game by 2 times set Time.timeScale = 2F;
To slow down by 2 set Time.timeScale = 0.5F;
Before every frame, actual time that passed from last frame update will be multiplied by timeScale and you get your deltaTime. This will affect all the physics, bot not your code. Unless you do it right and multiply everything by Time.deltaTime.
Something like:
if (Input.GetKey(KeyCode.W)) transform.position+= Vector3.Up*Time.deltaTime;
I was looking for ways to change timespeed and google gave me this topic at the top.
Personal advice: Using fixed update is often a bad idea, even if it feels easier and simpler. Learn to multuply all continious processes that happen in your game by Time.deltaTime.
Reasons:
- Most of the time FixedUpdate will be called few times during frame calculation. So it is extra work for CPU.
- There may be no Fixed Update call between two frames, so something will simply not move for 2 frames and it can be visually noticeable.
how to increase the speed like it was slower in the first then eventually its become faster and faster ? thanks in advance 
email me on this patrickdeguia@gmail.com thankyou