Photon PUN Clients Won't Connect in The Same Room

I’ve been trying to build a multiplayer game (with Photon Pun) for some months, and I’ve recently tried making a system which would detect when a player leaves the server.
To do all that and overall test the game, I’d make a build, run it on a different window, and also run the game on the Unity Editor. I’d then connect both of these clients to a single game room so that I can check all the variables and Debug.Log() functions.

However, all of a sudden, the builds started refusing to connect in the same room as the Unity Editor client. Two builds clients would just do fine connecting to one another’s game, but if I try doing the same with the Editor client, they’d just make two separate room games.

Another thing I noticed is that builds I’d make weeks ago would always make the “authorize to use networks” message appear. However, these ones don’t. Yet deactivating firewalls has no effect whatsoever and two build clients can connect between each other (on the same device tho, I haven’t tested two different ones for this issue yet).
And yet another thing to consider is that I had recently dealt with another issue: that builds would miss the Unity/TestRunner directory. And once I had fixed that, this issue appeared to ruin my day.

Any help would be greatly appreciated.
Also note that this is my first time even working with multiplayer.

I think the “authorize to use networks” message comes up once per install (path and or binary file).
So you answer it once and it should not bother the user again.

If your clients can not match into the same room, you likely use different Game Version strings or they end up in different regions. This may happen when using “Best Region” selection.

PUN uses a “Dev Region” for development builds and the editor but not for release builds. The editor and builds store their “Best Region” in the prefs, so this may stick for a long time.

In doubt, just set a Fixed Region in the Photon Server Settings or set the “Region Allowlist” for the App in the Photon Dashboard.

1 Like

Yeah, you were right. This solution works and I feel pretty embarassed for not thinking about it before.

Thanks for your help, really.

You’re welcome. Glad this helped.
We tried to make this happen less but in the end, we also do not want to accidentally lock down regions to just one.

1 Like