Layer (Legacy)
- Last UpdatedNov 05, 2023
- 2 minute read
The Layer node is an invisible node that can group other 2D nodes together so they can move, hide, or display together. Layer is a 2D node that can be combined with others to build up complex interface presented to the user in overlay. The Layer node inherits from RectBase (Legacy).
For more information, see Structuring a 2D interface using hierarchy.
Note: The legacy 2D nodes hierarchy has been replaced with a new and better performing hierarchy: 2D nodes. You should no longer use these older 2D nodes, except for very specific tasks.
Platform support
This node is supported on XR-Windows platform only.
|
XR-WIN |
XR-P-WIN |
XR-P-IOS |
XR-P-AND |
XR-P-WASM |
|---|---|---|---|---|
|
Full support |
No support |
No support |
No support |
No support |
|
|
|
|
|
|
Code example
This is a code example for the Layer node.
<layer name="layer" image="menu_fondo.png" show="false" position="1152 672" size="512 512" scale="0.5 0.5">
<rect image="pippo.png" order="2" opacity="1" position="0 0" />
<rect image="pluto.png" order="2" opacity="1" size="100 100" />
</layer>
Position
The 2D nodes can be positioned inside a context node, such as Context or Global, or be children of other 2D nodes.
Layer Fields
The Layer node has no specific parameters. It can be considered an instantiable version of RectBase (Legacy).