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
Inherited Members
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 |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown if multiple camera modes are enabled. |
InvalidOperationException | Thrown if multiple tracking modes are enabled. |
NotSupportedException | Thrown if the |
See Also
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
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
Methods
Equals(object)
Compares for equality.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The |
Returns
Type | Description |
---|---|
bool |
|
Overrides
See Also
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 |
|
See Also
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
See Also
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
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). |