public async void JoinOrCreateRoom() { leaveLastRoom(); this.room = await client.JoinOrCreate <GameState>("GameRoom"); readMessages(); setListeners(); this.gameObject.name += " [" + this.room.SessionId + "]"; }
public async void joinRoom(string id) { if (this.room != null) { if (this.room.Id != id) { leaveLastRoom(); this.room = await client.JoinById <GameState>(id); name = this.room.Name; setListeners(); } } else { this.room = await client.JoinById <GameState>(id); setListeners(); } }
async void join() { this.room = await client.Join <WorldState>("MapsRoom"); StartCoroutine(startSending()); }