/// <summary> /// Called when anchor download operations complete. /// </summary> private void RoomManagerListener_AnchorsDownloaded(bool successful, AnchorDownloadRequest request, XString failureReason) { // If we downloaded anchor data successfully we should import the data. if (successful) { int datasize = request.GetDataSize(); if (SharingStage.Instance.ShowDetailedLogs) { Debug.LogFormat("Anchor Manager: Anchor size: {0} bytes.", datasize.ToString()); } if (AnchorDebugText != null) { AnchorDebugText.text += string.Format("\nAnchor size: {0} bytes.", datasize.ToString()); } rawAnchorData = new byte[datasize]; request.GetData(rawAnchorData, datasize); currentState = ImportExportState.DataReady; } else { if (AnchorDebugText != null) { AnchorDebugText.text += string.Format("\nAnchor DL failed " + failureReason); } // If we failed, we can ask for the data again. Debug.LogWarning("Anchor Manager: Anchor DL failed " + failureReason); #if UNITY_WSA && !UNITY_EDITOR MakeAnchorDataRequest(); #endif } }
/// <summary> /// Called when anchor download operations complete. /// </summary> private void RoomManagerCallbacks_AnchorsDownloaded(bool successful, AnchorDownloadRequest request, XString failureReason) { // If we downloaded anchor data successfully we should import the data. if (successful) { int datasize = request.GetDataSize(); if (SharingStage.Instance.ShowDetailedLogs) { Debug.Log(datasize.ToString() + " bytes "); } rawAnchorData = new byte[datasize]; request.GetData(rawAnchorData, datasize); currentState = ImportExportState.DataReady; } else { // If we failed, we can ask for the data again. Debug.LogWarning("Anchor DL failed " + failureReason); MakeAnchorDataRequest(); } }