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 |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown if multiple camera modes are enabled. |
InvalidOperationException | Thrown if multiple tracking modes are enabled. |
NotSupportedException | Thrown if the |
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 |
Returns
Type | Description |
---|---|
Boolean |
|
Overrides
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 |
|
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
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). |