Kronos Matchmaking
Buy NowContact
  • About
    • Kronos LTS
    • Support
    • Accolades
  • Examples
    • Playable Demo
    • Sample Project
    • Example Content
  • Configuration
  • Testing & Debugging
  • Usage
    • Getting Started
    • Authentication
      • Authenticating Users
      • Customizing The Auth Widget
      • Creating Custom Auth Tasks
    • Matchmaking
      • Overview
      • Creating Matches
      • Starting Matchmaking
      • Canceling Matchmaking
      • Using Skill Ratings
      • Sending Match Invites
      • Joining Matches
      • Leaving Matches
    • Party
      • Overview
      • Creating Parties
      • Sending Party Invites
      • Joining Parties
      • Managing Party Players
      • Party Player Actors
      • Leaving Parties
    • Reservations
      • Overview
      • Using Reservations
      • The Host Reservation
      • Completing Reservations
    • Lobby
      • Overview
      • Lobby Setup
      • Set Players Ready
      • Lobby Player Data
      • Starting The Match
      • Updating Lobby Session
      • Leaving The Lobby
    • Widgets
  • Guides
    • Creating a Level Selector
    • Integrating with Lyra Game
    • Integrating with EIK
  • Advanced
    • Steam Sockets
    • Reconnect Parties
    • Custom Party Variables
    • Player Groups
  • Changelog
    • API Upgrades
    • Legacy
Powered by GitBook
On this page
  • Updating Session Settings
  • Important Note About Null Online Subsystem
  1. Usage
  2. Lobby

Updating Lobby Session

PreviousStarting The MatchNextLeaving The Lobby

Last updated 8 months ago

In most cases you will want to update the Session Settings of the lobby at some point because of changes in the game (such as playing on a new map).

Updating Session Settings

To update the Session Settings of a session you first have to get a copy of its current settings, make the changes on the copy, and then push the changes back to the session through the Online Subsystem. The KronosOnlineSession class contains all the necessary functionality to update sessions.

The lobby is considered a Game Session since it is used as part of an online match.

#include "KronosOnlineSession.h"
// Get the online session. Note that the OnlineSession class is the manager
// and not the actual session we are updating!
UKronosOnlineSession* OnlineSession = UKronosOnlineSession::Get(this);
if (OnlineSession)
{
    // Get the current session settings for the match that we are in.
    FKronosSessionSettings UpdatedSettings;
    if (OnlineSession->GetSessionSettings(NAME_GameSession, UpdatedSettings))
    {
        // Change the playlist of the match.
        UpdatedSettings.Playlist = TEXT("NewPlaylist");

        // Whether we want to push the changes to the backend (e.g. Steam) or not.
        // If this is false, only the local player's view of the session will be updated.
        bool bRefreshOnlineData = true;

        // Update the session. This operation is async and may not finish immediately!
        OnlineSession->UpdateSession(NAME_GameSession, UpdatedSettings, bRefreshOnlineData);
    }
}

Important Note About Null Online Subsystem

The Null Online Subsystem doesn't support updating data online, so only the local player will see the changes. For other limitations of the Null OSS please refer to section of the documentation.

Using the Null Subsystem