C# Class UnityEngine.VR.WSA.Sharing.WorldAnchorTransferBatch

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

Inheritance: IDisposable
Mostrar archivo Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Public Methods

Method Description
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

Private Methods

Method Description
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

Method Details

AddWorldAnchor() public method

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.
return bool

Dispose() public method

Cleans up the WorldAnchorTransferBatch and releases memory.

public Dispose ( ) : void
return void

ExportAsync() public static method

public static ExportAsync ( WorldAnchorTransferBatch transferBatch, SerializationDataAvailableDelegate onDataAvailable, SerializationCompleteDelegate onCompleted ) : void
transferBatch WorldAnchorTransferBatch
onDataAvailable SerializationDataAvailableDelegate
onCompleted SerializationCompleteDelegate
return void

GetAllIds() public method

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.
return int

GetAllIds() public method

Gets all of the identifiers currently mapped in this WorldAnchorTransferBatch.

public GetAllIds ( ) : string[]
return string[]

ImportAsync() public static method

public static ImportAsync ( byte serializedData, DeserializationCompleteDelegate onComplete ) : void
serializedData byte
onComplete DeserializationCompleteDelegate
return void

ImportAsync() public static method

public static ImportAsync ( byte serializedData, int offset, int length, DeserializationCompleteDelegate onComplete ) : void
serializedData byte
offset int
length int
onComplete DeserializationCompleteDelegate
return void

LockObject() public method

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.
return UnityEngine.VR.WSA.WorldAnchor

WorldAnchorTransferBatch() public method

public WorldAnchorTransferBatch ( ) : System
return System