Unity fifteen UGUI Canvas

Create a new canvas, just right in the Hierarchy in the menu bar or GameObject create a new Canvas. You can also directly create a new UI elements, Unity will generate a default Canvas, the new UI elements on Canvas below.
Here Insert Picture Description

There are several modes canvas:
Here Insert Picture Description
. 1, the Overlay, overwrite mode.
In this mode, the canvas is displayed at the highest level, if you add a 3d object, then Cube, and add a UI element Button, to coincide with their position, then Button will cover the Cube.
Parameters Sort Order: for setting the depth of the Canvas. When there are multiple canvases, decide who show that the larger the value at the top, the more the front.
2, Camera, camera mode
In this mode, the canvas is not the top, then if you add a 3d object Cube, and add a UI element Button, their position coincides with the above contrary, Cube will cover the Button.
When set to this mode, you need to set a camera to Canvas, otherwise, the model will have the same effect with overlay mode.
Here Insert Picture Description
Then the camera can use Main Camera, you can own re-add a Camera. This is the best. Main Camera responsible 3d scene, the new UI is responsible Camera
Here Insert Picture Description

3, World, World mode.
In this mode, Canvas 3d just as objects.

Published 56 original articles · won praise 24 · views 30000 +

Guess you like

Origin blog.csdn.net/u014196765/article/details/94326607