Play¶
Try the game without leaving Studio. Play runs the open scene the way the exported game runs it, and Stop puts you back where you were editing.
Play, pause and stop¶
- Switch to the Game view.
- Press Play in the bar over the view.
While it runs, the bar has Pause and Stop. Paused, it has Resume, Step one frame (to advance the game a single frame at a time) and Stop.
Stop ends the game and returns to editing the scene you had open, even if the game loaded another scene while it ran.
What runs¶
Play uses the same engine runtime a shipped game does:
- the keyboard and the game UI's buttons and sticks, with the scene's input actions,
- physics, including characters that walk and jump, and colliders built from a model's own shape,
- the scene's camera rig,
- blueprint graphs,
- shader effects, including edits you haven't saved,
- keyframed animation, particles, and a day cycle that moves the sun.
The game UI is live: buttons press, show their hovered and pressed looks, and bound text and bars update. On a touch screen, the scene's touch controls show.
Editing while it runs¶
Play runs a copy of the scene. While it runs, the hierarchy and inspector give way to the Game view's own panels, so you can't change the scene you're building by accident, and anything that changes in the game is thrown away when you press Stop.
Two kinds of edit do reach the running game:
- Saving a graph in the Logic view swaps the new version in, keeping its variables.
- Editing a shader in the Shader view shows in the game as you type.
Load Scene in Play¶
When a blueprint's Load Scene runs, Studio reads the scene it names and loads its models while the current scene keeps playing, then switches over. If the scene can't be loaded, the problem is written to the Console and the game stays on the current scene.
Frame stats¶
The clock button in the Game view's corner shows the frame stats over the game: frames per second, CPU and GPU time per frame, draw calls, entities and memory. It's the same setting as the Scene view's, so it stays on when you switch views.
A project with its own code¶
A project can carry Kotlin code of its own. On desktop, the first time you play such a project Studio asks before building and running its code, and remembers your answer for that project. Studio's built-in add-ons, such as blueprints, run everywhere without asking.
Preview motion without playing¶
To see keyframed animation and particles move without starting the game, use Preview motion in the Scene view's bar. Stop motion preview puts everything back in its authored pose.