Skip to main content

Lobby.TryGetServer method

Tries to get the current server of the lobby. Returns false and sets server to null if there’s no server on this Lobby.

Return Value

True if a server is found or false otherwise

Remarks

If this lobby object was joined by calling PlayFabMultiplayerServer.JoinLobbyAsServer, this method returns false and the server is null until PlayFabMultiplayerServer.ProcessServerLobbyStateChanges provides a PlayFabMultiplayerServer.OnJoinLobbyAsServerCompleted with the OnJoinLobbyAsServerCompleted result field set to true. If joining the lobby as server succeeds, it guarantees to be populated this field by the time. PlayFabMultiplayerServer.ProcessServerLobbyStateChanges provides a PlayFabMultiplayerServer.OnJoinLobbyAsServerCompleted.

See Also

Last modified on August 3, 2026