oculus-samples / Unity-SharedSpatialAnchors

Unity-SharedSpatialAnchors was built to demonstrate how to use the Shared Spatial Anchors API, available in the Meta XR Core SDK for the Unity game engine.
MIT License
114 stars 42 forks source link

Problems with Sharing Spatial Anchors #23

Open WahyuAgungBudiyanto opened 2 months ago

WahyuAgungBudiyanto commented 2 months ago

Description

Whenever I tried to click the button share anchor it gives me this error

Setup

Unity: 2022.3.22f1 Packages: Oculus XR Plugin 4.2.0 Device: Quest 3 Scene : SharedSpatialAnchorWithScene

Expected Results

Share button works and can be seen by other Photon members

Actual Results

[OVRSpatialAnchor] [7c60746f-3091-fc41-cd21-cbd61e92d240] OVRPlugin.SaveSpaceList failed with result: Failure.
UnityEngine.Debug:LogError (object)
OVRSpatialAnchor/Development:LogError (string) (at ./Library/PackageCache/com.meta.xr.sdk.core@63.0.0/Scripts/OVRSpatialAnchor.cs:1170)
OVRSpatialAnchor:InvokeMultiAnchorDelegate (ulong,OVRSpatialAnchor/OperationResult,OVRSpatialAnchor/MultiAnchorActionType) (at ./Library/PackageCache/com.meta.xr.sdk.core@63.0.0/Scripts/OVRSpatialAnchor.cs:677)
OVRSpatialAnchor:OnSpaceListSaveComplete (ulong,OVRSpatialAnchor/OperationResult) (at ./Library/PackageCache/com.meta.xr.sdk.core@63.0.0/Scripts/OVRSpatialAnchor.cs:1148)
OVRManager:UpdateHMDEvents () (at ./Library/PackageCache/com.meta.xr.sdk.core@63.0.0/Scripts/OVRManager.cs:2857)
OVRManager:Update () (at ./Library/PackageCache/com.meta.xr.sdk.core@63.0.0/Scripts/OVRManager.cs:2750)

image

Also to mention I commented the part when connecting to Oculus. I just wants to use and share between the Photon Server. not using Oculus ID. image

robbbbbb commented 1 month ago

@WahyuAgungBudiyanto the shared anchor objects still get saved to Meta servers, even if you share the UUID via Photon. The SaveSpaceList call is probably failing here because you have explicitly removed the Oculus.Platform.Core.Initialize() function. The GetLoggedInUser call is not necessary, but it is a good check to have in place. If your app, deployed on device, doesn't have a logged in user, none of the ongoing Oculus Platform calls will work anyway.

newton3 commented 1 week ago

That's correct - Shared Anchors are still saved on meta servers, even if you don't call save.