Room
Room
Events
event ConnectionStateChanged connectionStateChanged
event RPCMessageReceived rpcMessageReceived
event RoomEventHandler onWillWrite
event RoomEventHandler onWillRead
event RoomEventHandler onDidWrite
event RoomEventHandler onDidRead
Properties
string name { get; }
RegionMetadata? region { get; }
When Room moves to a ConnectingToRoom state, this will be filled in with metadata about the region being connected to, including an IP address that can be used to ping the region.
int clientID { get; }
double time { get; }
The server time on this frame in unix epoch time format. This value can be used to drive animations and is backed by a monotonic clock with sub-millisecond precision. This value has latency from the server removed.
float ping { get; }
The local client's last known ping with the server in milliseconds.
ConnectionState connectionState { get; }
The connection state of the room.
bool connecting { get; }
True if the room is connecting to the server.
bool connected { get; }
True if the room is connected to the server.
bool disconnected { get; }
True if the room is disconnected or in an error state.
bool offlineMode { get; }
True if the client was started in offline mode with no networking capabilities.
double datastoreFrameDuration { get; set; }
bool debugLogging { get; set; }
Component realtime { get; set; }
Datastore datastore { get; }
Methods
void Dispose()
void Connect(string roomName, string appKey, string matcherURL = null, RealtimeModel roomModel = null)
void Connect(string roomName, ConnectOptions connectOptions)
void Disconnect()
void Tick(double deltaTime)
bool SendRPCMessage(byte[] data, bool reliable)
bool SendRPCMessage(byte[] data, int dataLength, bool reliable)
AudioInputStream CreateAudioInputStream(bool voice, int sampleRate, int channels)
AudioOutputStream GetAudioOutputStream(int clientID, int streamID)