UILayer¶
Enumerations¶
- UILayerMode¶
How to compute the UI layer from the provided value.
- Values:
Absolute = 0 - The layer is taken directly from the UILayer value.
Relative = 1 - The layer is the sum of the node’s own UILayer value and the parent’s layer.
Classes¶
- UILayer : NativeComponent¶
Sets UI layer value for this node.
A layer defines an explicit sorting order for UI elements, with the ones having a higher value rendered on top.
For screen-space canvases (RenderMode.ScreenSpaceOverlay and RenderMode.ScreenSpaceCamera), the layer sorting
is done globally among all canvases, while for world-space ones it’s done per canvas.
Within the same layer, UI elements keep hierarchical sorting.
Child elements inherit the parent’s value unless they get their own UILayer component.
The layer can either be set as an absolute value (UILayerMode.Absolute) or added to the parent value (UILayerMode.Relative).
The scene root has layer 0 and UILayer components outside a canvas have no effect.
The effective layer is clamped to [-32768, 32767] range.
- Properties:
- UILayer.value: int¶
- UILayer.value =(value: int)¶
Layer value. All children without a UILayer component inherit this value.
- Arguments:
value : int
- UILayer.mode: UILayerMode¶
- UILayer.mode =(value: UILayerMode)¶
Layer application mode. See UILayerMode enum description for details.
- Arguments:
value : UILayerMode