docs.unity3d.com
Search Results for

    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.

    Implements
    IEquatable<Configuration>
    Inherited Members
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.ARSubsystems
    Assembly: Unity.XR.ARSubsystems.dll
    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. You can only enable exactly zero or one camera modes (see UserFacingCamera and WorldFacingCamera). If zero camera modes are enabled, no camera texture will be available. Some platforms might 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.

    See Also
    ConfigurationChooser
    configurationChooser
    DetermineConfiguration(Feature)

    Properties

    descriptor

    The descriptor contains information about the capabilities of a configuration.

    Declaration
    public readonly ConfigurationDescriptor descriptor { get; }
    Property Value
    Type Description
    ConfigurationDescriptor
    See Also
    ConfigurationChooser
    configurationChooser
    DetermineConfiguration(Feature)

    features

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

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

    You can ony enable exactly zero or one camera modes (see UserFacingCamera and WorldFacingCamera). If zero camera modes are enabled, no camera texture will be available. Some platforms might 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.

    See Also
    ConfigurationChooser
    configurationChooser
    DetermineConfiguration(Feature)

    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
    bool

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

    Overrides
    ValueType.Equals(object)
    See Also
    ConfigurationChooser
    configurationChooser
    DetermineConfiguration(Feature)

    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
    bool

    true if the other Configuration is equal to this one.

    See Also
    ConfigurationChooser
    configurationChooser
    DetermineConfiguration(Feature)

    GetHashCode()

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

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code of this Configuration.

    Overrides
    ValueType.GetHashCode()
    See Also
    ConfigurationChooser
    configurationChooser
    DetermineConfiguration(Feature)

    Operators

    operator ==(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
    bool

    The same as Equals(Configuration).

    See Also
    ConfigurationChooser
    configurationChooser
    DetermineConfiguration(Feature)

    operator !=(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
    bool

    The negation of Equals(Configuration).

    See Also
    ConfigurationChooser
    configurationChooser
    DetermineConfiguration(Feature)

    Implements

    IEquatable<T>

    See Also

    ConfigurationChooser
    configurationChooser
    DetermineConfiguration(Feature)
    In This Article
    Back to top
    Copyright © 2024 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)