The ID of the host of the room.
The code of the room.
The current start counter for the room.
Whether or not this room has been destroyed.
Every end game intent that should happen in a queue to be or not to be canceled.
The first item of each element being the name of the end game intent and the second being metadata passed with it.
See RoomEndGameIntentEvent to cancel an end game intent, or see StatefulRoom.registerEndGameIntent to register your own.
See RoomGameEndEvent to listen for a game actually ending.
Optional
fixedThe state that the game is currently in.
An instance of the lobby behaviour in the room. Spawned when the room is currently in the lobby waiting for a game to start.
It is possible for more than one lobby behaviour to be spawned, however this property is set and cleared for simplicity.
See StatefulRoom.objectList if you're looking to find all lobby behaviour objects that have been spawned.
An instance of the meeting hud in the room. Spawned when a meeting is started.
It is possible for more than one meeting hud to be spawned, however this property is set and cleared for simplicity.
See StatefulRoom.objectList if you're looking to find all meeting hud objects that have been spawned.
The current message stream to be sent to the server on fixed update.
The networked components in the room.
A list of all objects in the room.
The players in the room.
The privacy state of the room.
A map of spawn type -> objects used in the protocol. Useful to register custom INO (inner net objects) such as replicating behaviour from a client mod, see StatefulRoom.registerPrefab.
All roles that can be assigned to players. See StatefulRoom.registerRole.
The settings of the room.
An instance of the ship status in the room. Spawned when a game is started and represents the current map.
It is possible for more than one ship status to be spawned, however this property is set and cleared for simplicity.
See StatefulRoom.objectList if you're looking to find all ship status objects that have been spawned.
An instance of the voting ban system in the room. Used as a utility object for handling kick and ban votes.
It is possible for more than one vote ban system to be spawned, however this property is set and cleared for simplicity.
See StatefulRoom.objectList if you're looking to find all vote ban system objects that have been spawned.
Static
processHow often a processFixedUpdate should be called.
Whether or not the current client is the host of the room.
The host of the room.
Protected
_Protected
_Protected
_Optional
include: (number | Player<StatefulRoom<T>>)[]Optional
exclude: (number | Player<StatefulRoom<T>>)[]Whether or not this client/room is able to manage an object, i.e. perform host actions on it.
The object to manage.
Whether or not the object can be managed by this client/room.
Protected
createSpawn a prefab of an object.
The type of object to spawn.
The object that was spawned.
Protected
createDespawn a component.
The component being despawned.
Get a player by one of their components' netIds.
The net ID of the component of the player to search.
The player that was found, or null if they do not exist.
Get a player by their player ID.
The player ID of the player.
The player that was found, or null if they do not exist.
Handle when the game is ended.
The reason for why the game ended.
Handle when a client joins the game.
Handle when a client leaves the game.
The client that left the game.
Handle a client readying up.
The client that readied.
Register an intent to end the game.
The intention to end the game.
Register a custom INO spawn object by its spawn type. Can also override built-in objects.
The spawn type of the component as an integer.
The components in the object. The first component should be the main object which will inherit the rest of the components.
Register a role that can be assigned to a player.
The role to register to the room.
Resolve a player by some identifier.
The identifier to resolve to a player.
The resolved player.
Resolve a client id by some identifier.
The identifier to resolve to a client ID.
The resolved client ID.
Set the host of the room. If the current client is the new host, it will conduct required host changes. e.g. Spawning objects if they are not already spawned.
The new host of the room.
Change the settings of the room. If the host, it will broadcast these changes.
The settings to set to (Can be partial).
Spawn a component (Not broadcasted to all clients, see StatefulRoom.spawnObjectOfType).
The component being spawned.
Start the game. If the client's player is not the host, the server may ban the client.
Represents an object capable of hosting games.
See StatefulRoomEvents for events to listen to.