We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, everyone.
i try to apply to share worldanchor refer to this link https://docs.microsoft.com/en-us/windows/mixed-reality/out-of-scope/local-anchor-transfers-in-unity and i get SerializationCompletionReason.Unknownerror in hololens2 when i want to export worldanchor using WorldAnchorTransferBatch.ExportAsync(transferBatch, OnExportDataAvailable, OnExportComplete); here are my codes:
private void ExportGameRootAnchor()
{ WorldAnchorTransferBatch transferBatch = new WorldAnchorTransferBatch(); WorldAnchor anchor = rootGameObject.GetComponent<WorldAnchor>(); if (anchor == null) { anchor = rootGameObject.AddComponent<WorldAnchor>(); } transferBatch.AddWorldAnchor(rootGameObject.name, anchor); DebugText.text = transferBatch.anchorCount.ToString(); try { WorldAnchorTransferBatch.ExportAsync(transferBatch, OnExportDataAvailable, OnExportComplete); } catch { } } private void OnExportDataAvailable(byte[] data) { //exportAnchorData.AddRange(data); DebugText.text = "sending "; List<byte> sf = new List<byte>(); sf.Add(55);//表明发送的是anchor信息 sf.Add(44); sf.Add((byte)data.Length); sf.AddRange(data); byte[] sendBuffer = sf.ToArray(); clientSocket.Send(sendBuffer); //TransferDataToClient(data); } private void OnExportComplete(SerializationCompletionReason completionReason) { if (completionReason != SerializationCompletionReason.Succeeded) { //SendExportFailedToClient(); DebugText.text = "send failed + " +completionReason; } else { //SendExportSucceededToClient(); DebugText.text = "send success" + completionReason; } }
The text was updated successfully, but these errors were encountered:
Have anyone met this before or someone know how to solve this porblem, thx!
Sorry, something went wrong.
@GtYang2333 you might want to review microsoft/MixedRealityToolkit-Unity#8796
No branches or pull requests
Hello, everyone.
i try to apply to share worldanchor refer to this link
https://docs.microsoft.com/en-us/windows/mixed-reality/out-of-scope/local-anchor-transfers-in-unity
and i get SerializationCompletionReason.Unknownerror in hololens2 when i want to export worldanchor using WorldAnchorTransferBatch.ExportAsync(transferBatch, OnExportDataAvailable, OnExportComplete);
here are my codes:
The text was updated successfully, but these errors were encountered: