Get Your Personalized Game Dev Plan Tailored tips, tools, and next steps - just for you.

Unity: How to Exit Play Mode

Posted by Gemma Ellison
./
May 16, 2023

Quick Help

  • Press the Play button again to exit Play mode.

Introduction

As a new game developer working with Unity, you’re probably just learning about how to use the editor. Unity’s Play Mode allows you to simulate gameplay within the Unity Editor without building the full project. This makes it easy to quickly iterate on your code and develop projects faster. However, if you’re new to Unity it can be easy to get stuck in Play Mode! You might also see a warning from Unity when you try to save your project in Play Mode, “You must exit play mode to save the scene!”. So, this article will cover some details on Play Mode, what that error message means, and how to exit Play Mode in Unity.

Understanding Play Mode in Unity

In Unity, Play Mode is a state in which the game is actively running within the Unity Editor. This mode lets you interact with your game directly from the editor and test out your project without doing a full build of the project. Since a full build can take anywhere from fifteen seconds to a few minutes, this mode makes it comparatively easy to quickly develop and test new features.

What is the “You must exit play mode to save the scene!” error?

The error message “You must exit play mode to save the scene!” in Unity occurs when you attempt to save changes to the scene while still in Play Mode. Unity prevents saving the scene during Play Mode.

When you are in Play Mode, any changes that you make cannot be saved back to your original scene file. This makes it easy to make changes and adjust your project in Play Mode without having these changes affect your project. It also makes it easy for you to lose intentional changes that you made. Always make sure that you have exited Play Mode before trying to make changes to your scene.

Always remember to save your scene regularly to preserve your progress and avoid losing any changes to your project. I strongly recommend setting up a Git repository to help save and keep your work. If you’ve ever lost a paper for school, imagine how you would feel if you lost your entire game.

How to Exit Play Mode in Unity

When you’re ready to exit Play Mode and return to the Unity Editor, there are a few methods you can use.

Using the Toolbar

The most straightforward way to exit Play Mode in Unity is to simply press the “Play” button again. That’s the exact same button you pressed to enter play mode - the one on the top middle of the Unity Editor. When you press this button, Unity will exit Play Mode.

Keyboard Shortcut

The easiest and quickest way to exit Play Mode is by using the keyboard shortcut. Simply press Ctrl + P on Windows, and Unity will exit Play Mode immediately.

Pro tip: You can use the Ctrl + Shift + P to toggle the Pause Mode.

Using the Menu Bar

Finally, you can also exit Play Mode by accessing the menu bar options. In the Unity Editor’s menu bar, click on “Edit”. Then look for the “Play” option. When you click on “Play” while in Play Mode, Unity will transition out of Play Mode.

Create a free account, or log in.

Gain access to free articles, game development tools, and game assets.