Game Development Reference
In-Depth Information
What's in a Canvas?
As a big tip, when you are working on just building UI elements
and with positioning on a UI Canvas, it's best to switch to
2D
mode (using the 2D button at the top of the scene view). It just
makes things a lot easier with the UI.
When you have finished working on the UI, feel free to flip back
into 3D mode (tap the
2D
button again) to continue working
with a 3D scene.
Granted, if you are creating a 2D game, you may never leave the
2D mode.
Firstly, add a new
Canvas
to the scene using
Create
|
UI
|
Canvas
from the project
Hierarchy
or
GameObject
|
UI
|
Canvas
from the menu and then rename it to
ScreenSpaceCameraCanvas
.
We'll just use the project
Hierarchy
from now on since you know
where both the options are.
Now with the canvas in the scene, update its
Canvas Render
mode to
Screen
Space - Camera
and you should see the following view: