Class XREnvironmentProbeSubsystem.IProvider
The class for providers to implement to support the XREnvironmentProbeSubsystem.
Namespace: UnityEngine.XR.ARSubsystems
Syntax
protected abstract class IProvider : object
Properties
supported
Used to check for support at runtime. Should return true
if environment probes are supported, or false
otherwise.
Declaration
public abstract bool supported { get; }
Property Value
Type | Description |
---|---|
Boolean |
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.
SetAutomaticPlacement(Boolean)
Overridden by the provider implementation to set the automatic placement state for the environment probe subsystem.
Declaration
public virtual void SetAutomaticPlacement(bool value)
Parameters
Type | Name | Description |
---|---|---|
Boolean | value | Whether automatic placement of environment probes should be enabled ( |
Start()
Starts the subsystem. Will only be invoked if false
.
Declaration
public virtual void Start()
Stop()
Stops the subsystem. Will only be invoked if 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 |
|