RoomData

Store and retrieve room variables. Room data is cleared upon joining or creating a new lobby and does not reset between game rounds. Supports float, string, bool, and int types.

Note that RoomData is local only and does not sync. You must use network messages to sync room variables.

Function
Returns
Description

SetProperty(name: string, value: object)

null

Sets the property with given name to the object value. Valid value types are float, string, bool, and int.

GetProperty(name: string, defaultValue: object)

object

Gets the property with given name. If property does not exist, returns defaultValue.

Clear()

null

Clears all room data.

Last updated