A detailed API reference for the PlayFlowLobbyManagerV2 class in the Unity SDK.
This document provides a detailed reference for the public properties and methods of the PlayFlowLobbyManagerV2
class.
Singleton instance of the Lobby Manager. Access all lobby functionality through this.
Returns true if the manager has been successfully initialized.
Gets the full data for the lobby the player is currently in. Returns null if not in a lobby.
Gets the unique ID of the current player, as provided during initialization.
Gets the current state of the lobby session (e.g., Disconnected, InLobby).
Provides access to all lobby-related UnityEvents (e.g., OnLobbyJoined, OnPlayerLeft).
A cached list of all currently available public lobbies. This list is updated automatically if auto-refresh is enabled.
A quick check to see if the player is currently in a lobby.
Returns true if the current player is the host of the lobby they are in.
Gets the invite code for the current private lobby. Returns null if not in a private lobby.
Initialize
CreateLobby
Creates a new lobby. There are two overloads for this method.
Simple:
Detailed:
JoinLobby
JoinLobbyByCode
LeaveLobby
UpdatePlayerState
Updates the local player’s custom state data within the lobby. This is useful for synchronizing data like character selection, ready status, etc.
KickPlayer
Kicks a player from the lobby. This can only be called by the host.
TransferHost
Transfers host privileges to another player in the lobby. This can only be called by the current host.
StartMatch
EndMatch
GetGameServerConnectionInfo
Gets the connection details (IP and Port) for the game server if the lobby is in an active match.
Returns: A ConnectionInfo
struct if the server is running, otherwise null
.