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: Meh...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 Mac 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
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:
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.
Fixed my answer :P
Found the simple pause script very useful for testing. Thanks
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
2 People are following this question.
Why is my model being rendered this way?
Is there a way to emulate a touch in the Game view of the editor
Is there any way to get Debug.DrawLine() to display in the game view without other gizmos?
how to make a simple histogram
Lens Flares shines through (maya)-object geometry..