internal void UploadWorldAnchor(WorldAnchor wa, WorldAnchorTransferBatch.SerializationDataAvailableDelegate OnExportDataAvailable, WorldAnchorTransferBatch.SerializationCompleteDelegate OnExportComplete) { // Serialise the world anchor and then send the byte array // to the server.. WorldAnchorTransferBatch transferBatch = new WorldAnchorTransferBatch(); transferBatch.AddWorldAnchor("GameRootAnchor", wa); WorldAnchorTransferBatch.ExportAsync(transferBatch, OnExportDataAvailable, OnExportComplete); }
public static void ExportAsync(WorldAnchorTransferBatch transferBatch, WorldAnchorTransferBatch.SerializationDataAvailableDelegate onDataAvailable, WorldAnchorTransferBatch.SerializationCompleteDelegate onCompleted) { if (transferBatch == null) { throw new ArgumentNullException("transferBatch"); } if (onDataAvailable == null) { throw new ArgumentNullException("onDataAvailable"); } if (onCompleted == null) { throw new ArgumentNullException("onCompleted"); } WorldAnchorTransferBatch.ExportAsync_Internal(transferBatch.m_NativePtr, onDataAvailable, onCompleted); }
private static extern void ExportAsync_Internal(IntPtr transferBatch, WorldAnchorTransferBatch.SerializationDataAvailableDelegate onDataAvailable, WorldAnchorTransferBatch.SerializationCompleteDelegate onComplete);
private static void InvokeWorldAnchorSerializationCompleteDelegate(WorldAnchorTransferBatch.SerializationCompleteDelegate onSerializationComplete, SerializationCompletionReason completionReason) { onSerializationComplete(completionReason); }