Steam Lobby Metadata

Fields and Attributes
Data To Set
public List<StringKeyValuePair> dataToSet;
A collection of key-value pairs to apply to the lobby when the Set()
method is called. Typically used to initialize metadata when a lobby is created.
On Changed
public List<KeyEventMap> onChanged;
A collection of keys and associated Unity events. These events are invoked whenever the corresponding lobby metadata changes.
Methods
Refresh Key Values
public void RefreshKeyValues();
Updates the stored values for all keys in On Changed
. Invokes their events with the current lobby data. Called automatically when lobby data changes.
Set
public void Set();
Applies all Data To Set
entries to the lobby metadata. Only works if the local user is the lobby owner.
public void Set(string key, string value);
Sets a single key-value pair in the lobby metadata. Only the owner can modify data.
public void Set(StringKeyValuePair data);
Sets a single key-value pair using a StringKeyValuePair
object. Equivalent to Set(data.key, data.value)
.
Get
public string Get(string key);
Retrieves the value for the specified key from the lobby metadata. Returns an empty string if no lobby is set.
Has Key
public bool HasKey(string key);
Checks if the lobby metadata contains a non-empty value for the specified key. Returns false
if no lobby is set.
Last updated