Steam Lobby Create

Creates a lobby and updates the linked Steam Lobby Data.

Fields and Attributes

Party Wise

public bool partyWise = false;

If true:

  • When creating a Party lobby, any existing lobby will be left first.

  • When creating a Session lobby, any existing Party lobby will be notified of the new session.

Usage Hint

public SteamLobbyModeType usageHint = SteamLobbyModeType.Session;

Indicates how this lobby will be used. Optional; setting it to Party or Session allows you to use LobbyData helpers like GetGroup to reference the lobby in code.

Slots

public int slots;

Specifies the maximum number of members allowed in the new lobby.

Type

public SteamLobbyType type;

The Steam lobby type to create (e.g., Public, FriendsOnly, Private).


Functions

Create

public void Create()

Creates a new Steam lobby using the configured type, slots, and usageHint.

Behavior:

  • If partyWise is true and the player is in a Party lobby, they leave the existing lobby first.

  • Uses the LobbyData.Create a method and pass a callback to handle success or failure.

  • On success: updates m_Inspector.Data with the new LobbyData invokes OnCreated.

  • On failure: invokes OnCreateFailed with the EResult from the attempt.

Notes:

  • Only the Party lobby leader can create new lobbies when partyWise is enabled.

  • If usageHint is Session and a Party lobby existed, the old Party lobby’s metadata is updated to reference the new session lobby.

Last updated