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

Photon Room Generation #24

Closed TheWiselyBearded closed 1 month ago

TheWiselyBearded commented 2 months ago

Hi all,

I notice the default behavior is to name a room after a user name: CreateNewRoomForLobby(PhotonPun.PhotonNetwork.NickName);

This seemingly resulted in both players creating different rooms for joining. I tried changing this behavior such that the photon room is called "playground." So, CreateNewRoomForLobby("playground"); Despite this, both clients never seemingly join the same room. It shows no player is on the room, despite success messages and the same room name.

I can verify that all shared app permissions are created correctly in the Meta Developer dashboard. Further, both devices (Quest 2 and Quest 3) are signed into Test User Accounts.

Is there something else I'm missing? How can I successfully get both players to enter the same room?

stephenm2022 commented 1 month ago

Hi @TheWiselyBearded. The CreateNewRoomForLobby method is only invoked when a user presses the create room button. Joining users should select the room they want to join from the room list after is has been created.

TheWiselyBearded commented 1 month ago

Hey, sorry I didn’t close this out. Actually, the issue is that in the photon settings configuration file for the project a region isn’t specified. If the developer doesn’t specify a region (usw for example) then it’ll auto-assign the server. So in my case, despite two headsets being on the same network with the same room name, they weren’t able to connect until updating the configuration file.