C# Класс UnityEngine.VR.WSA.Persistence.WorldAnchorStore

The storage object for persisted WorldAnchors.

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Clear ( ) : void

Clears all persisted WorldAnchors.

Delete ( string id ) : bool

Deletes a persisted WorldAnchor from the store.

GetAllIds ( string ids ) : int

Gets all of the identifiers of the currently persisted WorldAnchors.

GetAllIds ( ) : string[]

Gets all of the identifiers of the currently persisted WorldAnchors.

GetAsync ( GetAsyncDelegate onCompleted ) : void
Load ( string id, GameObject go ) : WorldAnchor

Loads a WorldAnchor from disk for given identifier and attaches it to the GameObject. If the GameObject has a WorldAnchor, that WorldAnchor will be updated. If the anchor is not found, null will be returned and the GameObject and any existing WorldAnchor attached to it will not be modified.

Save ( string id, WorldAnchor anchor ) : bool

Saves the provided WorldAnchor with the provided identifier. If the identifier is already in use, the method will return false.

Приватные методы

Метод Описание
Clear_Internal ( IntPtr context ) : void
Delete_Internal ( IntPtr context, string id ) : bool
Destruct_Internal ( IntPtr context ) : void
GetAllIds_Internal ( IntPtr context, string ids ) : int
GetAnchorCount_Internal ( IntPtr context ) : int
GetAsync_Internal ( GetAsyncDelegate onCompleted ) : void
InvokeGetAsyncDelegate ( GetAsyncDelegate handler, IntPtr nativePtr ) : void
Load_Internal ( IntPtr context, string id, WorldAnchor anchor ) : bool
Save_Internal ( IntPtr context, string id, WorldAnchor anchor ) : bool
WorldAnchorStore ( IntPtr nativePtr ) : System

Описание методов

Clear() публичный Метод

Clears all persisted WorldAnchors.

public Clear ( ) : void
Результат void

Delete() публичный Метод

Deletes a persisted WorldAnchor from the store.

public Delete ( string id ) : bool
id string The identifier of the WorldAnchor to delete.
Результат bool

GetAllIds() публичный Метод

Gets all of the identifiers of the currently persisted WorldAnchors.

public GetAllIds ( string ids ) : int
ids string A target array to receive the identifiers of the currently persisted world anchors.
Результат int

GetAllIds() публичный Метод

Gets all of the identifiers of the currently persisted WorldAnchors.

public GetAllIds ( ) : string[]
Результат string[]

GetAsync() публичный статический Метод

public static GetAsync ( GetAsyncDelegate onCompleted ) : void
onCompleted GetAsyncDelegate
Результат void

Load() публичный Метод

Loads a WorldAnchor from disk for given identifier and attaches it to the GameObject. If the GameObject has a WorldAnchor, that WorldAnchor will be updated. If the anchor is not found, null will be returned and the GameObject and any existing WorldAnchor attached to it will not be modified.

public Load ( string id, GameObject go ) : WorldAnchor
id string The identifier of the WorldAnchor to load.
go UnityEngine.GameObject The object to attach the WorldAnchor to if found.
Результат UnityEngine.VR.WSA.WorldAnchor

Save() публичный Метод

Saves the provided WorldAnchor with the provided identifier. If the identifier is already in use, the method will return false.

public Save ( string id, WorldAnchor anchor ) : bool
id string The identifier to save the anchor with. This needs to be unique for your app.
anchor UnityEngine.VR.WSA.WorldAnchor The anchor to save.
Результат bool