docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct CompositionLayerManager.LayerInfo

    Information about composition layers registered with the manager.

    Implements
    IEquatable<CompositionLayerManager.LayerInfo>
    Inherited Members
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.XR.CompositionLayers.Services
    Assembly: Unity.XR.CompositionLayers.dll
    Syntax
    public struct CompositionLayerManager.LayerInfo : IEquatable<CompositionLayerManager.LayerInfo>

    Fields

    Id

    Unique id assigned by the CompositionLayerManager for the registered layer.

    Declaration
    public int Id
    Field Value
    Type Description
    int
    Remarks

    Prior to the introduction of manager-generated identifiers, this value was sourced from UnityEngine.Object.GetInstanceID(). It is now an independent counter managed by CompositionLayerManager to remove the dependency on GetInstanceID(), which is scheduled for deprecation in a future version of Unity. The value remains an int. It is stable and unique for the lifetime of the layer it was assigned to, but may be reused once that layer is destroyed.

    Layer

    The actual layer instance.

    Declaration
    public CompositionLayer Layer
    Field Value
    Type Description
    CompositionLayer

    Methods

    Equals(object)

    Compares this value to an arbitrary object.

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

    The object to compare against.

    Returns
    Type Description
    bool

    True if obj is a CompositionLayerManager.LayerInfo referring to the same registered layer.

    Overrides
    ValueType.Equals(object)

    Equals(LayerInfo)

    Determines whether this value and other refer to the same registered layer.

    Declaration
    public bool Equals(CompositionLayerManager.LayerInfo other)
    Parameters
    Type Name Description
    CompositionLayerManager.LayerInfo other

    The value to compare against.

    Returns
    Type Description
    bool

    True if both Id and Layer match.

    GetHashCode()

    Returns the hash code for this value, derived from Id.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    The hash code for this value.

    Overrides
    ValueType.GetHashCode()

    Implements

    IEquatable<T>
    In This Article
    Back to top
    Copyright © 2026 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)