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
119 stars 45 forks source link

Cannot Share anchors when using XR Simulator + ParrelSync #22

Open Steelswarm opened 4 months ago

Steelswarm commented 4 months ago

Hey!

For some reason, when I try to use ParrelSync to create a client clone of my app and use 2 XR simulators at the same time, sharing an anchor to the cloud fails. This does not seem to be the case if I deploy the app to a device. I've combined both the features of "ColocatedSafety" and "SharedSpatialAcnhorswithScene" Unity Scenes into one, by copying the missing prefabs on each and setting the "Automatic Colocation" boolean to true on the "Sample Controller" panel attached to the "Control Panel" gameobject

Other relevant information:

image

Running the "SharedSpatialAnchorsWithScene" sample also doesn't help. It seems that the scene is able to find that an anchor exists, but just fails to query it:

Screenshots from Room Host Point of view: (this is after Spawning the anchor and clicking on the "Share Anchor" button

This is what I get on the clone's Console: (there are no errors on the Host's console) image

image

Screenshots from the POV of the User that joined the room (Parrel Sync Clone of project):

image

image

PS: As I'm not sure if I can share the full ID of the XrSimUser, I have covered them except for the last 4 digits so you can be able to identify which is which more easily

Edit: This is running on Unity 2021.3.32f1, and the XR Simulator is Version 64 but the rest of the SDK is still in Version 63. In the project setup tool it states that this could cause issues but I could only find XR simulator v62 or v64? image

Steelswarm commented 4 months ago

Update: It seems that the problem persists when deploying the app to two different headsets, (both with authenticated accounts) so the issue is not the XR Simulator but the app itself that for some reason fails to query the anchors. Any idea to why this might be the case?

I've also tried to run the "SharedSpatialAnchors" scene and once I try to share an anchor I get the error "[OVRSpatialAnchor] [7d5c57e4-c4c4-bd43-9fb0-bcbb0d968877] OVRPlugin.ShareSpaces failed with result: Failure_SpaceNetworkRequestFailed."

Steelswarm commented 4 months ago

Update2: I decided to create another app ID but this time it was under another organization I'm a part of and surprisingly that worked just fine. I do not know why this is the case, as both organizations are verified and I performed the exact same steps (and both organizations are verified)