字幕列表 影片播放
The Game View in Unity is invoked when the Play button is pressed.
In this you can play test your game and get an idea
of what the gameplay will be like when it's built.
This can be paused and stepped forward at any time
in order to give you more accurate testing.
You can also tweak things whilst you are in play mode
in order to see what the game play is like with different settings.
The game view also allows you to set resolution
specific to the target platform that you're using.
For example my game view is set to Standalone
with a resolution of 1280 by 720.
If I choose to then maximise on play
the game view will restrict to exactly that resolution
so that I can see what it will look like.
To adjust this I go to Edit - Project Settings - Player
and this shows me the default
screen width and height under resolution.
If I edit this
I will see the change made immediately in the game view.
And if I choose to switch to a different target platform
I will get the resolution for that setting.
For example if I switch to Web Player
and return
Web Player is then featured
as the target platform I'm building for
and the preview mode for the game view.
In addition to Maximise On Play
the game view also has a Stats button
to allow you to see performance statistics
based on your game
and also the ability to show Gizmos in the same
way that the Scene view shows them already.
As you can adjust things whilst in play mode
you should also be aware
that any changes that you make will be undone
when returning to your project.
This is specific to changes that are
based on game objects in your scene
and not game objects that refgerence assets in the project.
For example if I was to change something relating to a material
that change is made to the original asset.
Whereas if I was to change something on a specific component
that change will be undone when play is pressed again.
It's also worth being aware
that when you press play, your game is running
and you can hint this by going to
Unity - Preferences on Mac
or Edit - Preferences on PC.
You can choose under Colours
a play mode tint,
I've chosen a shade of blue,
but I can make this any colour that I need to.
That way, when you press play
the rest of the interface will change to this colour.
This is to remind you that you are in
play mode and will lose changes
if you continue to work in that mode.