Toolbar and playback
- Game Development course
- Beginner
- Lesson 10/83
- 4 min
Learn the toolbar buttons and Play/Pause/Step controls.
What is the Unity Toolbar?
The Toolbar is the tool strip located at the top of the Unity Editor. You can access essential controls and some tools used while working on a project from this area.
Toolbar
[Transform Tools] [Play] [Pause] [Step]The Play, Pause, and Step buttons are especially useful when running and testing a game.
Play, Pause, and Step controls
Play enters or exits Play Mode. Pause temporarily pauses the running game, while Step advances the paused game by one frame.
Play → Run the game
Pause → Pause the game
Step → Advance one frameThese controls help you inspect game behavior and control specific moments during testing.
Practice Print playback controls
Create variables representing the three playback controls in the Unity Toolbar. Print the values Play, Pause, and Step on separate lines in that order.
Starter code
using UnityEngine;
public class ToolbarInfo : MonoBehaviour
{
void Start()
{
// Oynatma denetimlerini tanımla
// Denetimleri sırayla yazdır
}
}Sample solution
using UnityEngine;
public class ToolbarInfo : MonoBehaviour
{
void Start()
{
string playControl = "Play";
string pauseControl = "Pause";
string stepControl = "Step";
Debug.Log(playControl);
Debug.Log(pauseControl);
Debug.Log(stepControl);
}
}Expected output
Play Pause Step
Questions and answers
Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.
1 Which button should you press to run and test the game in Unity?
- Step
- Play Correct answer
- Inspector
- Pause
Explanation: The Play button runs the game and lets you test the gameplay in the Game window.
2 Pause the game
string control = "____";
string control = "Pause";
Explanation: Pause temporarily stops the running game. You can use the Play control to resume or exit Play Mode.
3 Toolbar controls
| Term | Meaning |
|---|---|
Play |
Enters Play Mode |
Pause |
Temporarily pauses the game |
Step |
Advances one frame |
Toolbar |
Contains tools and controls |