docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct VisionOSSortingGroup.RendererSorting

    Struct defining a renderer and its sort order.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    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.)

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)