Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

readRoomId

readRoomId(world): RoomId | null

The room’s own id, which teleportPlayers takes as { roomId }, such as a lobby’s id it hands its match for the trip back; null on a page, in a game played alone, and in the game’s start, which runs before the room knows its id: read it from the first step on, as every join hook and system does.

Parameter Type
world World

RoomId | null

const lobby = readRoomId(step.world);