Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Unity with James: Pausing a game

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
1,578
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Apr 21, 2011

In this tutorial I go over how to use timeScale to pause a game and display a GUI.

It is important to keep in mind that the time scale pausing method will not pause:
MUSIC - SCRIPTS - GUI ELEMENTS

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (Envatio)

  • It don't work

  • @82jomomma could you either send me your code or tell me how it doesn't work? This was made in Unity version 2. It may need an update. thx

  • Could you translate this into C# for people who do not know Javascript? i know that they are fairly similar but as a beginner programmer i am unsure of how to change the syntax. if you could do this that would be great.

  • @poolboy11120 unfortunately I am not currently well versed in C# but I will look into it, otherwise there may be someone in unity forums that can help you with that.

see all

All Comments (18)

Sign In or Sign Up now to post a comment!
  • Can you re-post your code in your video description. Great tutorial, but it would be helpful to zoom in on the code your writing, its far to blury.

  • @joskesnel You have to reference the mouse look script on your player and disable it. Code example:

    var Player = GameObject.Find("Player");

    var MouseLookScript = Player.GetComponent("MouseLook­");

    MouseLookScript.enabled = false;

  • @Envatio hey i have problem i do wath you do but im making a fps game en wen i pres p the came pause

    but i can still look around how can i fix that becouse its annoying if you want to click on somthing xD

  • it took me so long just to find a tutorial on how to pause in unity

  • @FlamingRoseStudios

    Not sure I understand. You want to use the mouse or you want to disable it?

    If you want to disable the mouse that's a bit tricky. You have to reference the mouselook script attached to the camera, and then set it to false.

    var Cam = GameObject.Find("Main Camera"); //Grab the camera

    var MouseLookScript = Cam.GetComponent("MouseLook"); Ref the script

    If(Paused == true){ MouseLookScript.enabled = false;

    }

  • Another question, is it possible to release the mouse? So theres no movement, so I could for example have a menu in pause screen. perhaps a Release.mouse or similar?

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more