- Home /
Keyboard shortcut to pause game view play?
Is clicking the pause button at the top of the Unity editor window the only way to pause the game in game view or is there a keyboard shortcut that can be used?
Answer by Eric5h5 · Jun 13, 2010 at 11:19 PM
Look in the Edit menu in Unity.
It should be something similar in Windows. In OS X, you can make any menu item have any keyboard shortcut you want, so if you don't like the default (or if there isn't one), feel free to change it in the system keyboard preferences.
Wait, this works when the Game window has focus? That doesn't seem right... there shouldn't be any keyboard shortcuts that work while the game has focus in the editor, so as not to disrupt the game input. I disagree with this implementation. :P
So it appears that it does work in-game... again, I don't like that. What if someone's game used that keyboard shortcut? I don't know... I just think it would be better if it only worked if the editor itself had focus, or you had to define your own shortcut if you wanted it.
@SpikeX: $$anonymous$$eh...it's more convenient to use the keyboard shortcut (I haven't actually clicked the play/pause icons in, I think, years), and how likely is it that you need the Command(ctrl)-Shift-P combo in-game? ;)
Also... is that 10.4 I see? Someone needs to upgrade ;) You know they're testing 10.7 already at Apple HQ, right? ;)
@SpikeX: If you can get Apple to release a new $$anonymous$$ac Pro, I'll upgrade...there's no real point putting 10.5 on my G5.
Answer by qJake · Jun 13, 2010 at 10:46 PM
Update
Control+Shift+P in Windows pauses the editor (Command+Shift+P on OSX).
If you want to pause manually:
You can create your own "pause hotkey" by doing something like this:
void Update()
{
if(Input.GetKeyDown(Keycode.P))
{
Debug.Break();
}
}
This makes it so when you press "P", Unity will pause the game, exactly like hitting the "Pause" button in the editor. Alternatively, you can code your own script that uses Debug.Break();
somewhere, because whenever you call that it's just like hitting Pause in the editor.
If this answer worked for you, consider upvoting (hit the grey Up arrow on this post), and accepting the answer (click the checkmark outline) so other people know this was the correct answer. Thanks!
Alas, it's not the correct answer...you definitely can use a keyboard shortcut for pausing in-game, just look in the Edit menu for what it is.
Found the simple pause script very useful for testing. Thanks
Your answer
![](https://koobas.hobune.stream/wayback/20220613062044im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
unity: scene shows nothing, PLEASE HELP 1 Answer
Raycast from mouse position in editor scene view? 1 Answer
How to add new column and get entry data at runtime in Localization table in unity Localization 2 Answers
Displaying th camera's view on a screen 1 Answer
Game View too small to fit iPad preview (on 13" Macbook) 0 Answers