Struct VisionOSSortingGroup.RendererSorting
Struct defining a renderer and its sort order.
Inherited Members
Namespace: Unity.PolySpatial
Assembly: Unity.PolySpatial.dll
Syntax
[Serializable]
public struct VisionOSSortingGroup.RendererSorting
Fields
applyToDescendants
Whether the sort order should also be applied to all descendant renderers.
Declaration
[Tooltip("Whether the sort order should also be applied to all descendant renderers.")]
public bool applyToDescendants
Field Value
Type | Description |
---|---|
bool |
order
Order within the sort group. Lower values indicate they should be drawn first.
Declaration
[Tooltip("Order within the sort group. Lower values indicate they should be drawn first.")]
public int order
Field Value
Type | Description |
---|---|
int |
renderer
The renderer the sort order should apply to.
Declaration
[Tooltip("The renderer the sort order should apply to.")]
public GameObject renderer
Field Value
Type | Description |
---|---|
GameObject |
Remarks
A GameObject can only belong to one sorting group. If you try to add a GameObject to a second group, the action is ignored.
If you set applyToDescendants to true
, then any child
GameObjects are also included in the sorting group at their parent's order.
(The parent does not need to have a renderer or collider in this case.)