docs.unity3d.com
    Show / Hide Table of Contents

    Struct Configuration

    Represents a session configuration. It consists of a configuration descriptor, which contains information about the capabilities of the configuration, and the specific features which should be enabled by this configuration. Use DetermineConfiguration(Feature) to get a Configuration given a set of features.

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

    Constructors

    Configuration(ConfigurationDescriptor, Feature)

    Constructs a Configuration.

    Declaration
    public Configuration(ConfigurationDescriptor descriptor, Feature features)
    Parameters
    Type Name Description
    ConfigurationDescriptor descriptor

    A ConfigurationDescriptor for this configuration.

    Feature features

    A set of Feature(s) that should be enabled for this configuration. Exactly zero or one camera mode must be enabled (see UserFacingCamera and WorldFacingCamera). If zero camera modes are enabled, no camera texture will be available. Some platforms may support a configuration that does not provide camera textures, which can be more performant if they are not necessary. All features must be supported by the descriptor.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if multiple camera modes are enabled.

    InvalidOperationException

    Thrown if multiple tracking modes are enabled.

    NotSupportedException

    Thrown if the descriptor does not support one or more features.

    Properties

    descriptor

    The descriptor contains information about the capabilities of a configuration.

    Declaration
    public ConfigurationDescriptor descriptor { readonly get; }
    Property Value
    Type Description
    ConfigurationDescriptor

    features

    The specific Feature(s) that should be enabled by this configuration.

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

    Exactly zero or one camera mode must be enabled (see UserFacingCamera and WorldFacingCamera). If zero camera modes are enabled, no camera texture will be available. Some platforms may support a configuration that does not provide camera textures, which can be more performant if they are not necessary. All enabled features must be supported by the descriptor.

    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 Configuration and Equals(Configuration) is true.

    Overrides
    ValueType.Equals(Object)

    Equals(Configuration)

    Compares for equality.

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

    The other Configuration to compare against.

    Returns
    Type Description
    Boolean

    true if the other Configuration 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 Configuration.

    Overrides
    ValueType.GetHashCode()

    Operators

    Equality(Configuration, Configuration)

    Compares for equality.

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

    The left-hand side of the comparison.

    Configuration rhs

    The right-hand side of the comparison.

    Returns
    Type Description
    Boolean

    The same as Equals(Configuration).

    Inequality(Configuration, Configuration)

    Compares for inequality.

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

    The left-hand side of the comparison.

    Configuration rhs

    The right-hand side of the comparison.

    Returns
    Type Description
    Boolean

    The negation of Equals(Configuration).

    See Also

    ConfigurationChooser
    configurationChooser
    DetermineConfiguration(Feature)
    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