docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct VisionOSSortingGroup.RendererSorting

    Identifies the sort order, parent GameObject, and other properties for a member of a sorting group.

    Implements
    IEquatable<VisionOSSortingGroup.RendererSorting>
    Inherited Members
    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 : IEquatable<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

    Drawing order within the sorting group. Lower values are drawn first and capture input last.

    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 GameObject containing the Renderer instance to draw at the associated order in the group.

    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.)

    Methods

    Equals(object)

    Overload to determine object equality

    Declaration
    public override readonly bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to check against

    Returns
    Type Description
    bool

    True if obj is an equivalent RendererSorting, false otherwise

    Overrides
    ValueType.Equals(object)

    Equals(RendererSorting)

    For comparing if two RendererSortings are equal, used for insertion and remove from Lists.

    Declaration
    public readonly bool Equals(VisionOSSortingGroup.RendererSorting other)
    Parameters
    Type Name Description
    VisionOSSortingGroup.RendererSorting other

    The RendererSorting to compare

    Returns
    Type Description
    bool

    True if the RendererSortings are equal, false otherwise

    GetHashCode()

    Declaration
    public override readonly int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    ValueType.GetHashCode()

    Implements

    IEquatable<T>
    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)