Play in the Studio
Play mode runs your game in the Studio exactly as players get it, with debug tools around it: pause, step, eject, Shift+F1 and the play options.
On this page
Play mode runs your project's game inside the Studio's viewport. It is the game as it runs on its own, one to one: the same code, settings, start screen, camera, menus and HUD. The Studio adds debug tools around the game and never changes the game itself.
Start and stop#
Choose Play in the mode switcher at the top of the Studio. The viewport switches from the editing camera to the game's camera, and the play bar appears at the top of the viewport.
Every Play starts fresh: the game session is rebuilt from your scene, and the game resets its own screens (menus, HUD, camera) as if it had just launched. Your added objects and moves from Scene mode are in place.
To end the session, choose stop on the play bar or switch back to Scene. The Studio stays open, and the editing camera returns to where it was before you pressed Play. The Studio never saves the scene while you play, so moving things around in Play doesn't change your project.
Give the game your keyboard and mouse#
The Studio owns the window, so the game only gets the keyboard and mouse while its viewport has focus:
- Click in the viewport to hand the game your input. It captures the mouse if the game asks for it.
- Shift+F1 gives the mouse and keys back to the Studio while the game keeps running.
- Esc belongs to the game, as in its own window (for example, its pause menu or releasing the mouse).
Leaving Play also gives input back to the Studio.
What "one to one" means#
| The game on its own | Play in the Studio | |
|---|---|---|
| Start | The game's start screen | The same start screen, every time you press Play |
| Picture | The game's window | The viewport, framed to the game's resolution (letterboxed) |
| Game UI | Laid out for the window | Laid out at the game's resolution, so text and panels sit where they do in the window |
| Camera | The game's camera | The game's camera |
| Esc | The game's | The game's; Shift+F1 returns input to the Studio |
| Quit | The game exits | The play session ends; the Studio stays |
In the browser Studio, Play runs the same game as the desktop Studio. A browser can't compile Rust, so a project made from a template runs the template's game as it was built; script and scene changes still apply, and changes to the project's Rust code need the desktop Studio.
Debug tools#
The play bar#
The play bar at the top of the viewport has four buttons:
| Button | What it does |
|---|---|
| Pause / resume | Freezes the game and continues it. |
| Step | Advances one frame while paused. |
| Eject (F8) | The editor camera takes over from where the game camera is, while the game keeps running. Fly around the live game, select and inspect objects, then press F8 again to go back to the game camera. |
| Stop | Ends the play session. |
Play options#
The viewport's gear menu has two options for Play:
- Frame Play to game resolution (on by default). Turn it off to fill the viewport; the game's UI stays laid out at its resolution.
- Game HUD in Scene shows the game's HUD while you edit.
The game's own debug keys#
The game's own debug keys and menus work as they do in its window, including its pause menu on Esc.
Live panels#
The Scene panel and the camera preview show the live session while you play. Scripts keep running and can be watched and controlled from the Scripts panel; saving a script in Source mode hot-reloads it in the running game.
Play from a script or agent#
Play is open to commands, so agents and tests drive it the same way you do. An agent connected to the desktop Studio over MCP plays exactly as a person does:
| Command | What it does |
|---|---|
play.start | Starts Play at the game's start screen. |
play.pause / play.step | Pause, and step one frame. |
play.stop | Stops it. |
editor.play.focus | Hands the game the keyboard (the real cursor is never grabbed). |
editor.play.input {keys, frames?} | Sends key presses, the same input a real key sends, for example {"keys": ["W", "Shift"], "frames": 120} to hold for 120 frames. |
editor.options.set {game_frame} | Turns Frame Play to game resolution on or off. |
For game authors#
If you write your own game code, keep these in mind so Play stays one to one:
- Don't turn features off just because the game runs inside the Studio. Anything you'd switch off belongs behind a command line flag.
- If your game keeps state outside the gameplay kit (menus, screens, toggles), reset it when a play session begins.
- Size UI relative to the screen (percentages, viewport units), never to the window's width: inside the Studio, the window is the Studio's.