Struct CompositionLayerManager.LayerInfo
Information about composition layers registered with the manager.
Implements
Inherited Members
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 |
Overrides
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 |
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. |