U3d sorting layer, sort order, order in layer, layer depth discrimination

Source: Internet
Author: User

1,layer is the classification of all objects in the game, such as Uilayer, Waterlayer, 3DModelLayer, Smallassetslayer, Effectlayer, etc. Different classes of objects are divided into different layers for easy camera picking, which layers can be rendered in the camera's cullmask, and the layers not selected will not be rendered. It can also be used for the selection of Ray detection objects, which can be specified only for radiographic detection of objects in certain layers.

The 2,canvas default is a 2D object in screen space, with only the sort order property in screen space, and when it is set to world space, the sort order property disappears and becomes two other properties: sorting layer, order in layer.

When the canvas is set to WorldSpace, the canvas and UI objects on the canvas will be rendered in world space by default, with Z-values determining the rendering order, and rendering away from the camera. When the sorting layer is set, the rendering order is determined by the sorting layer. The sorting layer is a custom identifier, which Sortinglayer is rendered first (in the order in which it is set in layer & tags).

The order in layer is a number, which is a subdivision within the same sorting layer, and the smaller the value of the order in layer is rendered before the sorting layer is the same.

Everything in the screen space is in the UI layer and does not require a sorting layer, only the sort order (in fact, the order in layer). By default, the sort oder is 0, at which point the UI objects determine the rendering order in the order in which they appear in hierachy. If the sort order is different, the smaller the value, the better the first render.

3, pay special attention to the sprite default is a 3D space object, even if it is placed in a screen space on the canvas, it is still 3D space objects, only follow the rules of 3D space: Always be blocked by the UI.

4, with sorting layer, order in layer object: Sprite, canvas of World space

Object with sort order only: canvas for screen space

object with sorting layer only: not present

object with order in layer only: not present

No sorting order this thing!

U3d sorting layer, sort order, order in layer, layer depth discrimination

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.