The Game View shows a representation
of our final published game.
In the Game View, we can play and test our game
in its current state at any time.
The Play Mode buttons in the Toolbar
allow us to play, pause,
and step-through our game on a frame by frame basis.
To enter Play Mode, simply click on the Play button.
When our game is running,
we can choose to pause the game by clicking on the Pause button,
or step frame by frame through our game.
At the top of the Game View is the Game View Control Bar.
The Game View Control Bar contains items that allow us
to customize how the Game View is displaying our game.
The first item to the left in the Game View Control Bar
is the Display dropdown menu.
The Display dropdown menu allows us to choose
between a list of Cameras in the Scene.
It is set to display one by default,
and we can assign the display a Camera is rendering to
by changing the target display property of any Camera.
Displays also allow us to isolate specific Cameras
during playtesting.
Displays can also be used with the Multi-display feature.
The Multi-display feature allows us to display
up to eight different Camera views from our game
on up to eight different monitors at the same time.
For more information on Multi-display,
please see the information linked below.
The next item in the Game View Control Bar
is the aspect dropdown menu.
The aspect dropdown menu allows us to select different values
to test how our game will look on monitors
with different aspect ratios and resolutions.
By testing different resolutions and aspect ratios,
we can ensure that all of the layouts,
Cameras and items within our game, such as our UI elements,
are working correctly for all of our target platforms.
We can also add a custom resolution or aspect ratio to this list.
To add our own custom resolution or aspect ratio,
we can simply click on the + button,
name the custom setting,
and add the values for either a fixed resolution or aspect ratio.
To the right of the dropdown menu is the Scale slider.
The Scale slider allows us to zoom in and examine areas
of the Game View in more detail.
We can also zoom out to see the entire screen
in situations where the target resolution is higher
than the Game View window size.
It is also worth noting that when the game is not running or paused,
we can use the scroll wheel to zoom in and out.
We can also use the middle mouse button
to move around the Game View window while zoomed in.
On the right-hand side of the Game View Control Bar
are the Maximize On Play and Mute Audio buttons
and the Stats and Gizmos dropdown menus.
The Maximize On Play button allows us to toggle
a full-screen preview of our game.
When Maximize on Play is not selected,
our game will play within the current Game View.
When the Maximize on Play button is selected
and Play Mode is entered,
the Game View will maximize in the Editor,
filling as much of the screen as possible.
Note that even when maximized, the Game View will maintain
our chosen resolution or aspect ratio.
The Mute Audio button, when selected,
will mute any in-game audio in Play Mode.
The Stats button toggles the statistics overlay
containing rendering statistics
about our game’s audio and graphics.
This is useful for monitoring the performance of our game
while in Play Mode.
The final button in the Game View Control Bar
is the Gizmo toggle.
The Gizmo toggle enables and disables
the visibility of Gizmos in the Game View.
Similar to the Scene View, from the Gizmo Menu,
we can select which Gizmos we would like to see in the Game View.
For more information on Gizmos and the Gizmos Menu,
see the information linked below.
While the game is running and the Editor is in Play Mode,
we can make changes to our GameObjects in the Scene.
For instance, we can move and edit
the Transform of GameObjects in our Scene
or adjust values and properties of Components in the Inspector.
This allows us to see how any potential changes
will affect our game.
It is worth noting, however,
that any of the changes we make in the Editor
while it is in Play Mode
will be reset when we exit Play Mode.
Any changes to physical assets such as Materials will not be reset,
and these changes will persist, as they are not in the current Scene.
The Editor UI darkens when we are in Play Mode.
This reminds us that the changes we are making will be reset
when we exit Play Mode.
We can customize this change in color
by adjusting the Play Mode Tint setting in Preferences.
To do this, we choose Edit > Preferences > Colors
and select our desired color for the Play Mode Tint
under the general heading.
As we can see, the Game View is ideal for previewing our game
without having to leave the Unity Editor.