Class XREnvironmentProbeSubsystem.Provider
The class for providers to implement to support the XREnvironmentProbeSubsystem.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.ARSubsystems
Assembly: Unity.XR.ARSubsystems.dll
Syntax
public abstract class XREnvironmentProbeSubsystem.Provider : SubsystemProvider<XREnvironmentProbeSubsystem>
Properties
automaticPlacementEnabled
Overridden by the provider implementation to query whether automatic placement is enabled for the environment probe subsystem.
Declaration
public virtual bool automaticPlacementEnabled { get; }
Property Value
Type | Description |
---|---|
bool |
automaticPlacementRequested
Overridden by the provider implementation to set the automatic placement request state for the environment probe subsystem.
Declaration
public virtual bool automaticPlacementRequested { get; set; }
Property Value
Type | Description |
---|---|
bool |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown in the default implementation if set to |
environmentTextureHDREnabled
Overridden by the provider implementation to query the state of HDR environment texture generation.
Declaration
public virtual bool environmentTextureHDREnabled { get; }
Property Value
Type | Description |
---|---|
bool |
environmentTextureHDRRequested
Overridden by the provider implementation to request the state of HDR environment texture generation.
Declaration
public virtual bool environmentTextureHDRRequested { get; set; }
Property Value
Type | Description |
---|---|
bool |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown if HDR textures are requested but the implementation does not support HDR environment textures. |
Methods
GetChanges(XREnvironmentProbe, Allocator)
Get changes to environment probes (added, updated, and removed) since the last call to this method.
Declaration
public abstract TrackableChanges<XREnvironmentProbe> GetChanges(XREnvironmentProbe defaultEnvironmentProbe, Allocator allocator)
Parameters
Type | Name | Description |
---|---|---|
XREnvironmentProbe | defaultEnvironmentProbe | A default value for environment probes. Implementations should first fill their output arrays with copies of this value, then copy in their own. See the NativeCopyUtility. This allows additional fields to be added to the XREnvironmentProbe in the future. |
Allocator | allocator | The allocator to use for the |
Returns
Type | Description |
---|---|
TrackableChanges<XREnvironmentProbe> | The environment probes which have been added, updated, and removed since the last call to this method. |
See Also
RemoveEnvironmentProbe(TrackableId)
Overridden by the provider to remove the environment probe matching the trackable ID from the AR session.
Declaration
public virtual bool RemoveEnvironmentProbe(TrackableId trackableId)
Parameters
Type | Name | Description |
---|---|---|
TrackableId | trackableId | Trackable ID of the environment probe to be removed from the AR session. |
Returns
Type | Description |
---|---|
bool |
|
Remarks
You can use this method to remove both manually placed and automatically placed environment probes if the
implementation supports such removals. Providers should implement this method to remove environment probes of
the allowed types and to throw a System.NotSupportedException
for removals of environment probes of
disallowed types.
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown in the default implementation. |
TryAddEnvironmentProbe(Pose, Vector3, Vector3, out XREnvironmentProbe)
Overridden by the provider implementation to manually add an environment probe to the AR session.
Declaration
public virtual bool TryAddEnvironmentProbe(Pose pose, Vector3 scale, Vector3 size, out XREnvironmentProbe environmentProbe)
Parameters
Type | Name | Description |
---|---|---|
Pose | pose | The position and rotation at which to create the new environment probe. |
Vector3 | scale | The scale of the new environment probe. |
Vector3 | size | The size (dimensions) of the new environment probe. |
XREnvironmentProbe | environmentProbe | If successful, should be populated with the newly created environment probe. |
Returns
Type | Description |
---|---|
bool |
|
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown in the default implementation of this method. |