AndroidXRAnchorSubsystem
The Android XR implementation of the XRAnchorSubsystem so it can work seamlessly with ARAnchorManager.
Summary
Inheritance
Inherits from:XRAnchorSubsystem
Public functions |
|
---|---|
GetPersistState(TrackableId trackableId, out XRAnchorPersistStates state)
|
bool
Get persistence state of the given anchor.
|
GetPersistState(Guid guid, out XRAnchorPersistStates state)
|
bool
Get persistence state of the given anchor by GUID.
|
GetPersistentId(TrackableId anchor)
|
Guid
Gets the persistent id associated with the given anchor.
|
Persist(TrackableId anchor)
|
bool
Try to save the anchor on device's local storage.
|
TryGetAllPersistedIds(ref List< Guid > guids)
|
bool
Gets all persisted ids that currently are saved on device's local storage, it can be used in TryLoad(Guid) to retrieve the persisted anchors across multiple sessions or removed by Unpersist(Guid).
|
TryLoad(Guid guid)
|
bool
Try to load a persisted anchor from the given guid .
|
Unpersist(Guid guid)
|
bool
Try to remove a persisted anchor from device's local storage.
|
Unpersist(TrackableId trackableId)
|
bool
Try to remove a persisted anchor from device's local storage.
|
Public functions
GetPersistState
bool GetPersistState( TrackableId trackableId, out XRAnchorPersistStates state )
Get persistence state of the given anchor.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
Returns a boolean to indicate whether successfully got persistence state.
|
GetPersistState
bool GetPersistState( Guid guid, out XRAnchorPersistStates state )
Get persistence state of the given anchor by GUID.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
Returns a boolean to indicate whether successfully got persistence state.
|
GetPersistentId
Guid GetPersistentId( TrackableId anchor )
Gets the persistent id associated with the given anchor.
It can be used in TryLoad(Guid) to retrieve the persisted anchor across multiple sessions. If the anchor is not persisted, returns Guid.Empty
.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The persistent id of the given anchor.
|
Persist
bool Persist( TrackableId anchor )
Try to save the anchor on device's local storage.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
Returns a boolen to indicate whether successfully saved the anchor on device's local storage.
|
TryGetAllPersistedIds
bool TryGetAllPersistedIds( ref List< Guid > guids )
Gets all persisted ids that currently are saved on device's local storage, it can be used in TryLoad(Guid) to retrieve the persisted anchors across multiple sessions or removed by Unpersist(Guid).
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
Returns a boolean to indicate whether successfully retrieved all stored ids.
|
TryLoad
bool TryLoad( Guid guid )
Try to load a persisted anchor from the given guid .
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
Returns a boolean to indicate whether successfully loaded the given guid .
|
Unpersist
bool Unpersist( Guid guid )
Try to remove a persisted anchor from device's local storage.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
Returns a boolean to indicate whether successfully removed the anchor from device's local storage.
|
Unpersist
bool Unpersist( TrackableId trackableId )
Try to remove a persisted anchor from device's local storage.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
Returns a boolean to indicate whether successfully removed the anchor from device's local storage.
|