Skip to content

Surface lobby ServerData updates in FOnlineSessionSettings#88

Open
maryammadzadeh wants to merge 1 commit into
PlayFab:mainfrom
maryammadzadeh:feat/surface-serverdata-in-session-settings
Open

Surface lobby ServerData updates in FOnlineSessionSettings#88
maryammadzadeh wants to merge 1 commit into
PlayFab:mainfrom
maryammadzadeh:feat/surface-serverdata-in-session-settings

Conversation

@maryammadzadeh
Copy link
Copy Markdown

@maryammadzadeh maryammadzadeh commented May 27, 2026

Summary

FOnlineSessionPlayFab::OnLobbyUpdate mirrors most PFLobbyUpdatedStateChange fields into FNamedOnlineSession::SessionSettings but silently ignores the three fields added for the server-on-client-owned-lobby feature (PFMultiplayerJoinLobbyAsServer + PFLobbyServerPostUpdateAsServer). As a result, a game_server entity's data, presence, and liveness on a client-owned lobby are invisible to Unreal game code even though the SDK delivers them on every state change.

Changes

All in Source/Private/OnlineSessionInterfacePlayFab.cpp, inside OnLobbyUpdate, matching the style of the existing loops/flag handlers:

  1. updatedServerPropertyKeys — new loop reads each updated server property via PFLobbyGetServerProperty and writes it into SessionSettings.Settings, mirroring the existing updatedLobbyPropertyKeys and updatedSearchPropertyKeys loops. nullptr values remove the key.
  2. serverUpdated — calls PFLobbyGetServer and exposes the joined server's entity id under the reserved key _server_entity. On departure the key is removed (along with _server_connection_status).
  3. serverConnectionStatusUpdated — calls PFLobbyGetServerConnectionStatus and exposes "Connected" / "NotConnected" under the reserved key _server_connection_status, so clients can detect when the server's link to the lobby service drops and ServerData may go stale.
    ate.

@maryammadzadeh maryammadzadeh force-pushed the feat/surface-serverdata-in-session-settings branch from 72a90f3 to 0b50353 Compare May 27, 2026 20:52
FOnlineSessionPlayFab::OnLobbyUpdate mirrors most PFLobbyUpdatedStateChange fields into FNamedOnlineSession::SessionSettings but silently ignores the three fields added for the server-on-client-owned-lobby feature (PFMultiplayerJoinLobbyAsServer + PFLobbyServerPostUpdateAsServer). As a result, a game_server entity's data, presence, and liveness on a client-owned lobby are invisible to Unreal game code even though the SDK delivers them on every state change.

Changes (all in OnLobbyUpdate, matching the style of the existing loops/flag handlers): (1) updatedServerPropertyKeys -- new loop reads each updated server property via PFLobbyGetServerProperty and writes it into SessionSettings.Settings, mirroring the existing lobby/search property loops; nullptr values remove the key. (2) serverUpdated -- calls PFLobbyGetServer and exposes the joined server's entity id under the reserved key _server_entity; on departure the key is removed along with _server_connection_status. (3) serverConnectionStatusUpdated -- calls PFLobbyGetServerConnectionStatus and exposes Connected/NotConnected under the reserved key _server_connection_status so clients can detect when the server's link drops and ServerData may go stale.

No public API change, no header change, no SDK version bump. No behavior change when no game_server has joined the lobby. Reserved key naming follows the existing _flags convention.
@maryammadzadeh maryammadzadeh force-pushed the feat/surface-serverdata-in-session-settings branch from 0b50353 to 11338b8 Compare May 28, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant