Class XREnvironmentProbeSubsystem.Provider
The class for providers to implement to support the XREnvironmentProbeSubsystem.
Namespace: UnityEngine.XR.ARSubsystems
Syntax
public abstract class Provider
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 |
---|---|
Boolean |
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 |
---|---|
Boolean |
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 |
---|---|
Boolean |
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 |
---|---|
Boolean |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown if HDR textures are requested but the implementation does not support HDR environment textures. |
Methods
Destroy()
Invoked when the XREnvironmentProbeSubsystem is about to be destroyed.
Declaration
public virtual void Destroy()
GetChanges(XREnvironmentProbe, Allocator)
Get changes (added, updated, and removed) in environment probes 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 |
---|---|
Boolean |
|
Remarks
This method may be used to remove both manually-placed and automatically-placed environment probes if the
implementation supports such removals. Providers should implement this method 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. |
Start()
Starts the subsystem. Will only be invoked if
running is false
.
Declaration
public virtual void Start()
Stop()
Stops the subsystem. Will only be invoked if
running is true
.
Declaration
public virtual void Stop()
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 |
---|---|
Boolean |
|
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown in the default implementation of this method. |