[Photon] can't find custom created room using random matchmaking

Hello everyone,

I am working on a multiplayer game using Photon.
I am trying to implement 2v2 matchmaking while playing with a friend.
Random matchmaking is working perfectly fine, and as soon as 4 players join my room, I start the game, and it works. However the problem happens when I try to invite a friend.

I create a custom room (using PhotonNetwork.JoinOrCreateRoom) and send the invitation to my club that contains the room name (any player from my club can accept the invitation and join my room). In the beginning I set the room to IsVisible = false so no one can find it using random matchmaking, and then as soon as someone accepts the invitations and joins the room (again using using PhotonNetwork.JoinOrCreateRoom), I make it IsVisible = true so it becomes visible to random matchmaking. I see that the player that accepts my invitation is in the same room as me and I see the room becoming visible, so this part is working.
However when I try to do random matchmaking with a third player (using PhotonNetwork.JoinRandomRoom), I can’t find that room and he ends up creating his own room instead and I can’t understand why.

If anyone has any hint or wants more information to discuss this issue, it would be very helpful. I’ve been debugging this for days and I still can’t understand why I can’t find that room using regular random matchmaking.

Thanks again for any help!

Which version of PUN do you use?
Three things come to my mind here:
a) All clients need to be in the same region. Sometimes best region selection isn’t correct and a client connects to another region.
b) The update of isVisible needs a moment to distribute, so if you quickly JoinRandom, it may (still) fail. Give it a moment.
c) You need each client to have a unique userID. This is the case by default but if you got a login screen which sets the userID, it could be you use the same on multiple clients.

There is a Matchmaking Checklist on the docs, which offers additional info.

Hi there. I’m getting the same problem and I verified these:
The build and the editor are on the same region (asia). I toasted it and they printed the same region
The is Visible is True and I gave it a moment. Still can’t find.
I don’t have a login screen.

Any remediate I can try?

Turn on the SupportLogger and check both logs.
The Matchmaking Checklist is complete. If you don’t find a hint in the logs, send them to developer@photonengine.com.

will do. thank you so much

sent an email explaining the problem. is it okay for me to send a video instead?

Videos are not worth the effort, imo. We need to see the logs, code, etc. All of the hard info is text, so a video … won’t help.

got it. by the way, I read the documentation and found out that Ownership transfers could only happen once in a scene? (Correct me if I’m wrong) I

Ownership can be transferred as often as you want to. Each transfer takes a bit of time, of course, as it travels the internet…

I see. Yeah I confirmed it. It happened that I asked this because of an error in code logic. Thank you so much. You’re the best.

1 Like