cancel
Showing results for 
Search instead for 
Did you mean: 

Can't Share Spatial Anchors

BlackOut977
Explorer

We're working on a local multiplayer game for Quest 2/3 and have been working fairly successfully with Shared Spatial Anchors for the past few months.

We've just swapped over to the new Meta All In One SDK and now can no longer Share spatial anchors with logged in users. We've tried using both Share() and ShareAsync().

We're able to get them both to work when using the Quest Link in the Unity Editor, but when we build the APK to the App Lab, both type of Share call just hang and never return a value — and never share the anchors.

Here's the code snippet were using to share the anchors.

foreach (ulong oculusUserId in userIds)
        {
            //teacherLogger.TeacherLog($"ShareWithClass: Adding user {oculusUserId} to spaceUserList");
            spaceUserList.Add(new OVRSpaceUser(oculusUserId));
            userIdStrings[userIds.IndexOf(oculusUserId)] = oculusUserId.ToString();
        }

        teacherLogger.TeacherLog($"ShareWithClass: Sharing anchor with {userIds.Count} users: {string.Join(", ", userIdStrings)}");


        teacherLogger.TeacherLog("ShareWithClass: Sharing anchor with class");

        _ovrSpatialAnchor.ShareAsync(spaceUserList).ContinueWith((task) =>
        {
            if (task == OVRSpatialAnchor.OperationResult.Success)
            {
                teacherLogger.TeacherLog("ShareWithClass: Anchor shared with class");
            }
            else
            {
                teacherLogger.TeacherLogError("ShareWithClass: Failed to share anchor with class");
                teacherLogger.TeacherLogError(task.ToString());
            }
        });

 

0 REPLIES 0