How to detect which client created a room?

Context

I have created a system where my Simulator transitions through distinct states before sending an RPC to each client, telling them to load the “game” scene. The first state each client moves through is “lobby”. I want to be able to detect which of the connected clients is the client who initially requested that a room be created, as they are the ones who should be allowed to start the game once everyone has clicked the ready button.

I didn’t see any properties on the ClientConnection object which would indicate that a client is the one who created the room. Is this possible?

Considered Alternatives

I could assume that the first non-simulator client to connect is the client who created the room.

TLDR

Is it possible to detect which client created a room from the ClientConnection objects coming from the MonoBridge.ClientConnections events?

Cross-posting the answer I received on Discord here:

Not currently. You could infer based on seeing if you’re alone when you enter a room but theres a race there and it’s not 100%.

2 Likes