Room

Represents a room on the server. Manages the connection to the server and the datastore.

Events

connectionStateChanged

event ConnectionStateChanged connectionStateChanged

rpcMessageReceived

event RPCMessageReceived rpcMessageReceived

onWillWrite

event RoomEventHandler onWillWrite

onWillRead

event RoomEventHandler onWillRead

onDidWrite

event RoomEventHandler onDidWrite

onDidRead

event RoomEventHandler onDidRead

Properties

name

string name { get; }

clientID

int clientID { get; }

time

double time { get; }

connectionState

ConnectionState connectionState { get; }

The connection state of the room.

connecting

bool connecting { get; }

True if the room is connecting to the server.

connected

bool connected { get; }

True if the room is connected to the server.

disconnected

bool disconnected { get; }

True if the room is disconnected or in an error state.

datastoreFrameDuration

double datastoreFrameDuration { get; set; }

debugLogging

bool debugLogging { get; set; }

realtime

Component realtime { get; set; }

datastore

Datastore datastore { get; }

Methods

Dispose

void Dispose()

Connect

void Connect(string roomName, string appKey, string matcherURL = null, RealtimeModel roomModel = null)

Disconnect

void Disconnect()

Tick

void Tick(double deltaTime)

SendRPCMessage

bool SendRPCMessage(byte[] data, bool reliable)

SendRPCMessage

bool SendRPCMessage(byte[] data, int dataLength, bool reliable)

CreateAudioInputStream

AudioInputStream CreateAudioInputStream(bool voice, int sampleRate, int channels)

GetAudioOutputStream

AudioOutputStream GetAudioOutputStream(int clientID, int streamID)

GetNetworkStatistics

NetworkInfo GetNetworkStatistics()