- Home /
How do I make a pause menu?
I have no idea how to make a pause menu. I want to make my game have a cursor lock but have the ability to unlock it by pausing. I use javascripts but C# and the others are fine if needed
I suggest searching the forums and Unity Answers for 'pause' or 'pause menu' (this comes up frequently - there are even some example scripts floating around).
Answer by Zachary · Dec 08, 2010 at 03:31 AM
copy and paste that code then apply it to the button
http://unity3d.com/support/documentation/ScriptReference/Screen-lockCursor.html
Apply it to what button? Can you be a little more more specific?
the start game button. so like play game or options or quit game if there is play game on your menu then drag the script to that text box and when you click the button in game it will play your game and lock your cursor and if you hit esc then it will appear again.
just let me know if you need any more i help i would be glad to try to help!
Answer by OmegaVemon · Nov 23, 2010 at 02:16 AM
Well, you can unlock the cursor anytime with Screen.lockCursor = false; As for the menu, I guess taking a look at GUI in the docs might be enough.
Answer by DVFrance · Aug 29, 2012 at 10:20 AM
You can also just hide the cursor and show it on your pause menu :
Screen.showCursor = false;
Screen.showCursor = true;
Your answer
Follow this Question
Related Questions
show pause menu issues 1 Answer
Script that makes the mouse cursor invisible. 3 Answers
Making a Pause Menu 1 Answer
Menu Script Problem 0 Answers