PlayFlowLobbyManagerV2 uses a system of UnityEvents to communicate state changes and important occurrences to your game. By subscribing to these events, you can create a responsive UI and trigger game logic at the right moments.
All events are accessible through the PlayFlowLobbyManagerV2.Instance.Events property, which is an instance of PlayFlowEvents.
Subscribing to Events
You subscribe to events using the standardAddListener method. It’s best practice to do this after the manager has been initialized.
Event Reference
Here is a complete list of events available onPlayFlowEvents.
Lobby Events
Fired when a lobby is successfully created by the local player. The event passes the created
Lobby object.
Argument: LobbyFired when the local player successfully joins a lobby.
Argument:
LobbyFired whenever the
Lobby data changes. This can be due to players joining/leaving, player state changes, or host actions.
Argument: LobbyFired after the local player successfully leaves a lobby.
Argument:
voidMatch Events
Fired for all players in a lobby when the host starts the match (via
StartMatch() or a completed matchmaking cycle). Status is now in_game, but the server is still launching.
Argument: LobbyFired when the game server has finished booting and is ready to accept connections. The payload is a quick-access
ConnectionInfo for the first port. For multi-port games use lobby.TryGetPort("name", out var port) instead.
Argument: ConnectionInfoFires alongside
OnMatchRunning with the full list of ports (name, protocol, host, internal/external port, TLS state). Subscribe to this when your game has more than one port (e.g. game_udp + voice_tcp).
Argument: List<PortMappingInfo>Fired for all players when a match ends — either the host called
EndMatch(), or the server stopped on its own (TTL, crash, clean exit). The lobby auto-heals back to waiting with the same players and invite code, ready for a rematch.
Argument: LobbyMatchmaking Events
Fired when the lobby enters the matchmaking queue (after a successful
FindMatch() call). Status is now in_queue.
Argument: LobbyFired roughly every 10 seconds while the lobby is searching, with live telemetry: total players searching, number of lobbies in queue, and average wait time. Perfect for a “42 players searching · ~12s wait” UI.
Argument:
QueueStatsFired when opponents are found and the match is committed. For modes without confirmation this fires right before
OnMatchStarted. For modes with confirmation enabled, use OnMatchAwaitingConfirmation instead — OnMatchFound only fires after every lobby has accepted.
Argument: LobbyOnly relevant when the matchmaking mode has
matchConfirmation.enabled: true in the dashboard. Fired when a match proposal is found — show a CS2-style “Accept Match” dialog. The lobby is in match_found status. Use lobby.matchmaking.confirmation.deadline (ISO 8601 timestamp) for the countdown.
Argument: LobbyFired after
ConfirmMatch() succeeds — your lobby has accepted. You’re still waiting on other lobbies to confirm. Update your UI to show “Waiting on N other players…”.
Argument: LobbyFired when the match proposal is cancelled — either someone called
DeclineMatch(), or the confirmation window expired. All participating lobbies return to waiting. Show a “Match declined — click to re-queue” UI.
Argument: LobbyFired when the host calls
CancelMatchmaking() and the lobby returns to waiting voluntarily.
Argument: LobbyFired when the matchmaking queue times out without finding a match. The lobby returns to
waiting.
Argument: LobbyPlayer Events
Fired for all players in a lobby when a new player joins. The
PlayerAction contains the ID of the player who joined.
Argument: PlayerActionFired for all players in a lobby when another player leaves. The
PlayerAction contains the ID of the player who left.
Argument: PlayerActionSystem Events
Fired when the client successfully connects to the PlayFlow service.
Argument:
voidFired when the client disconnects from the PlayFlow service.
Argument:
voidFired when any error occurs within the SDK. Provides a string message describing the error.
Argument:
stringState Events
Fired whenever the manager’s internal state transitions (
Disconnected, Connecting, Connected, InLobby, InMatch, etc.). Useful for gating UI flow — (oldState, newState).
Argument: LobbyState, LobbyState