Class XRReferencePointSubsystem.IProvider
An interface to be implemented by providers of this subsystem.
Namespace: UnityEngine.XR.ARSubsystems
Syntax
protected class IProvider : object
Methods
Destroy()
Called when Destroy
is called on the subsystem.
Declaration
public virtual void Destroy()
GetChanges(XRReferencePoint, Allocator)
Declaration
public virtual TrackableChanges<XRReferencePoint> GetChanges(XRReferencePoint defaultReferencePoint, Allocator allocator)
Parameters
Type | Name | Description |
---|---|---|
XRReferencePoint | defaultReferencePoint | |
Allocator | allocator |
Returns
Type | Description |
---|---|
TrackableChanges<XRReferencePoint> |
Start()
Invoked when Start
is called on the subsystem. This method is only called if the subsystem was not previously running.
Declaration
public virtual void Start()
Stop()
Invoked when Stop
is called on the subsystem. This method is only called if the subsystem was previously running.
Declaration
public virtual void Stop()
TryAddReferencePoint(Pose, out XRReferencePoint)
Should create a new reference point with the provide pose
.
Declaration
public virtual bool TryAddReferencePoint(Pose pose, out XRReferencePoint referencePoint)
Parameters
Type | Name | Description |
---|---|---|
Pose | pose | The pose, in session space, of the new reference point. |
XRReferencePoint | referencePoint | The new reference point. Must be valid only if this method returns |
Returns
Type | Description |
---|---|
Boolean | Should return |
TryAttachReferencePoint(TrackableId, Pose, out XRReferencePoint)
Should create a new reference "attached" to the trackable with id trackableToAffix
.
The behavior of the reference point depends on the type of trackable to which this reference point is attached and
may be implemenation-defined.
Declaration
public virtual bool TryAttachReferencePoint(TrackableId trackableToAffix, Pose pose, out XRReferencePoint referencePoint)
Parameters
Type | Name | Description |
---|---|---|
TrackableId | trackableToAffix | The id of the trackable to which to attach. |
Pose | pose | The pose, in session space, of the reference point to create. |
XRReferencePoint | referencePoint | The new reference point. Must be valid only if this method returns |
Returns
Type | Description |
---|---|
Boolean |
|
TryRemoveReferencePoint(TrackableId)
Should remove an existing reference point with TrackableId referencePointId
.
Declaration
public virtual bool TryRemoveReferencePoint(TrackableId referencePointId)
Parameters
Type | Name | Description |
---|---|---|
TrackableId | referencePointId | The id of an existing reference point to remove. |
Returns
Type | Description |
---|---|
Boolean | Should return |