docs.unity3d.com
    Show / Hide Table of Contents

    Struct ConfigurationDescriptor

    Information about a configuration supported by a XRSessionSubsystem. Used by a ConfigurationChooser to select a configuration for the session.

    Namespace: UnityEngine.XR.ARSubsystems
    Syntax
    public struct ConfigurationDescriptor : IEquatable<ConfigurationDescriptor>
    Remarks

    A session provider may have multiple, discrete "modes" of operation each with a different set of capabilities. A configuration descriptor represents the capabilities of a single "mode" of operation, which may be a subset of the session's overal capabilities. That is, the session may support many features, but not all at the same time.

    Constructors

    ConfigurationDescriptor(IntPtr, Feature, Int32)

    Constructs a ConfigurationDescriptor.

    Declaration
    public ConfigurationDescriptor(IntPtr identifier, Feature capabilities, int rank)
    Parameters
    Type Name Description
    IntPtr identifier

    A unique identifier for this descriptor.

    Feature capabilities

    The supported capabilities of the configuration.

    Int32 rank

    Higher values indicate this configuration should be chosen over another, otherwise equivalent configuration.

    Properties

    capabilities

    The capabilities of this configuration.

    Declaration
    public readonly Feature capabilities { get; }
    Property Value
    Type Description
    Feature

    identifier

    A unique identifier for this descriptor.

    Declaration
    public readonly IntPtr identifier { get; }
    Property Value
    Type Description
    IntPtr

    rank

    The "rank" of this configuration relative to other configurations. This can be used by a ConfigurationChooser when deciding between multiple configurations that support the requested Features.

    Declaration
    public readonly int rank { get; }
    Property Value
    Type Description
    Int32

    Methods

    Equals(Object)

    Compares for equality.

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

    The object to compare against.

    Returns
    Type Description
    Boolean

    true if obj is of type ConfigurationDescriptor and Equals(ConfigurationDescriptor) is true.

    Overrides
    ValueType.Equals(Object)

    Equals(ConfigurationDescriptor)

    Compares for equality.

    Declaration
    public bool Equals(ConfigurationDescriptor other)
    Parameters
    Type Name Description
    ConfigurationDescriptor other

    The other ConfigurationDescriptor to compare against.

    Returns
    Type Description
    Boolean

    true if the other ConfigurationDescriptor is equal to this one.

    GetHashCode()

    Generates a hash code suitable for use in a Dictionary or HashSet.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    A hash code of this ConfigurationDescriptor.

    Overrides
    ValueType.GetHashCode()

    ToString()

    Generates a string representation suitable for debugging.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    A string representation suitable for debugging.

    Overrides
    ValueType.ToString()

    Operators

    Equality(ConfigurationDescriptor, ConfigurationDescriptor)

    Compares for equality.

    Declaration
    public static bool operator ==(ConfigurationDescriptor lhs, ConfigurationDescriptor rhs)
    Parameters
    Type Name Description
    ConfigurationDescriptor lhs

    The left-hand side of the comparison.

    ConfigurationDescriptor rhs

    The right-hand side of the comparison.

    Returns
    Type Description
    Boolean

    The same as Equals(ConfigurationDescriptor).

    Inequality(ConfigurationDescriptor, ConfigurationDescriptor)

    Compares for inequality.

    Declaration
    public static bool operator !=(ConfigurationDescriptor lhs, ConfigurationDescriptor rhs)
    Parameters
    Type Name Description
    ConfigurationDescriptor lhs

    The left-hand side of the comparison.

    ConfigurationDescriptor rhs

    The right-hand side of the comparison.

    Returns
    Type Description
    Boolean

    The negation of Equals(ConfigurationDescriptor).

    See Also

    ConfigurationChooser
    DetermineConfiguration(Feature)
    GetConfigurationDescriptors(Allocator)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023