Method DestroyPendingTrackable
DestroyPendingTrackable(TrackableId)
If in a "pending" state and destroyOnRemoval is
true
, this method destroys the trackable's GameObject
. Otherwise, this method has no effect.
Declaration
protected bool DestroyPendingTrackable(TrackableId trackableId)
Parameters
Type | Name | Description |
---|---|---|
TrackableId | trackableId | The id of the trackable to destroy. |
Returns
Type | Description |
---|---|
bool |
|
Remarks
Trackables are usually removed only when the subsystem reports they have been removed during Update().
This method will immediately remove a trackable only if it was created by CreateTrackableImmediate(TSessionRelativeData) and has not yet been reported as added by the subsystem.
This can happen if the trackable is created and removed within the same frame, as the subsystem might never have a chance to report its existence. Derived classes should use this if they support the concept of manual addition and removal of trackables, as there might not be a removal event if the trackable is added and removed quickly.
If the trackable is not in a pending state (that is, it has already been reported as "added"), then this method does nothing.
This method does not invoke OnTrackablesChanged(List<TTrackable>, List<TTrackable>, List<TTrackable>), so no "removed" notifications will occur until the next call to Update(). "Removed" notifications will only occur if it was previously reported as "added".