C# Класс UnityEngine.VR.WSA.Sharing.WorldAnchorTransferBatch

A batch of WorldAnchors which can be exported and imported between apps.

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

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

Метод Описание
AddWorldAnchor ( string id, WorldAnchor anchor ) : bool

Adds a WorldAnchor to the batch with the specified identifier.

Dispose ( ) : void

Cleans up the WorldAnchorTransferBatch and releases memory.

ExportAsync ( WorldAnchorTransferBatch transferBatch, SerializationDataAvailableDelegate onDataAvailable, SerializationCompleteDelegate onCompleted ) : void
GetAllIds ( string ids ) : int

Gets all of the identifiers currently mapped in this WorldAnchorTransferBatch. If the target array is not large enough to contain all the identifiers, then only those identifiers that fit within the array will be stored and the return value will equal the size of the array. You can detect this condition by checking for a return value less than WorldAnchorTransferBatch.anchorCount.

GetAllIds ( ) : string[]

Gets all of the identifiers currently mapped in this WorldAnchorTransferBatch.

ImportAsync ( byte serializedData, DeserializationCompleteDelegate onComplete ) : void
ImportAsync ( byte serializedData, int offset, int length, DeserializationCompleteDelegate onComplete ) : void
LockObject ( string id, GameObject go ) : WorldAnchor

Locks the provided GameObject to the world by loading and applying the WorldAnchor from the TransferBatch for the provided id.

WorldAnchorTransferBatch ( ) : System

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

Метод Описание
AddWorldAnchor_Internal ( IntPtr context, string id, WorldAnchor anchor ) : bool
Create_Internal ( ) : IntPtr
DisposeThreaded_Internal ( IntPtr context ) : void
Dispose_Internal ( IntPtr context ) : void
ExportAsync_Internal ( IntPtr transferBatch, SerializationDataAvailableDelegate onDataAvailable, SerializationCompleteDelegate onComplete ) : void
GetAllIds_Internal ( IntPtr context, string ids ) : int
GetAnchorCount_Internal ( IntPtr context ) : int
INTERNAL_CALL_Create_Internal ( IntPtr &value ) : void
ImportAsync_Internal ( byte serializedData, int offset, int length, DeserializationCompleteDelegate onComplete ) : void
InvokeWorldAnchorDeserializationCompleteDelegate ( DeserializationCompleteDelegate onDeserializationComplete, SerializationCompletionReason completionReason, IntPtr nativePtr ) : void
InvokeWorldAnchorSerializationCompleteDelegate ( SerializationCompleteDelegate onSerializationComplete, SerializationCompletionReason completionReason ) : void
InvokeWorldAnchorSerializationDataAvailableDelegate ( SerializationDataAvailableDelegate onSerializationDataAvailable, byte data ) : void
LoadAnchor_Internal ( IntPtr context, string id, WorldAnchor anchor ) : bool
WorldAnchorTransferBatch ( IntPtr nativePtr ) : System

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

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

Adds a WorldAnchor to the batch with the specified identifier.

public AddWorldAnchor ( string id, WorldAnchor anchor ) : bool
id string The identifier associated with this anchor in the batch. This must be unique per batch.
anchor UnityEngine.VR.WSA.WorldAnchor The anchor to add to the batch.
Результат bool

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

Cleans up the WorldAnchorTransferBatch and releases memory.

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

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

public static ExportAsync ( WorldAnchorTransferBatch transferBatch, SerializationDataAvailableDelegate onDataAvailable, SerializationCompleteDelegate onCompleted ) : void
transferBatch WorldAnchorTransferBatch
onDataAvailable SerializationDataAvailableDelegate
onCompleted SerializationCompleteDelegate
Результат void

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

Gets all of the identifiers currently mapped in this WorldAnchorTransferBatch. If the target array is not large enough to contain all the identifiers, then only those identifiers that fit within the array will be stored and the return value will equal the size of the array. You can detect this condition by checking for a return value less than WorldAnchorTransferBatch.anchorCount.

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

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

Gets all of the identifiers currently mapped in this WorldAnchorTransferBatch.

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

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

public static ImportAsync ( byte serializedData, DeserializationCompleteDelegate onComplete ) : void
serializedData byte
onComplete DeserializationCompleteDelegate
Результат void

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

public static ImportAsync ( byte serializedData, int offset, int length, DeserializationCompleteDelegate onComplete ) : void
serializedData byte
offset int
length int
onComplete DeserializationCompleteDelegate
Результат void

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

Locks the provided GameObject to the world by loading and applying the WorldAnchor from the TransferBatch for the provided id.

public LockObject ( string id, GameObject go ) : WorldAnchor
id string The identifier for the WorldAnchor to load and apply to the GameObject.
go UnityEngine.GameObject The GameObject to apply the WorldAnchor to. If the GameObject already has a WorldAnchor, it will be updated.
Результат UnityEngine.VR.WSA.WorldAnchor

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

public WorldAnchorTransferBatch ( ) : System
Результат System