Page cover

Lobby Member Data

Like what your seeing?

Introduction

using HeathenEngineering.SteamworksIntegration;
public struct LobbyMemberData

LobbyMemberData is a structure that wraps around LobbyData and UserData to simplify access to the lobby member metadata and related features for a specific user on a specific lobby. In most cases, you would be working with the LobbyMemberData of the local user and can easily create the LobbyMemberData by reading it from the related lobby.

//Assuming we have a Lobby named myLobby
//We can get our LobbyMember by reading the me field
LobbyMemberData lobbyMember = myLobby.Me;

The most common thing to do with a LobbyMemberData is to set the metadata of that member.

lobbyMember["fieldName"] = "fieldValue";

You can learn more about Lobby metadata and LobbyMemberData metadata by reading this article.

This struct represents a user in a given lobby.

You can get a list of the LobbyMemberData's in a Lobby or you can create the LobbyMemberData assuming you know the Lobby ID and the User's ID i.e.

Is the exact same data as

which is the same data as

Fields and Attributes

Lobby

The ID of the lobby this member is a member of

User

The ID of the user this represents

Is Ready

A shortcut to read or write the user's lobby member metadata for the field z_heathenReady

This is the same as calling

to set a value or

The read the value as a bool

Game Version

A shortcut to read or write the user's lobby member metadata for the field z_heathenGameVersion

This is the same as calling

to set a value or

The read the value as a bool

Methods

this[string key]

Can be used to get or set metadata values on this user. Only the user its self can set metadata values.

Kick

Kick this user from this lobby using the Heathen Kick list

Get

This returns a lobby member data object for the indicated user, in the indicated lobby ... this assumes the member is in the lobby it does not test for this.

Generally your better to use

Last updated