Unity Client Broken? (SOLVED)

Just a head's up. It would seem like the Unity sample you've provided is broken. When room.Send() get's called, room returns null.

Upon further checking, it would seem that I am unable to join a room and that the OnRoomJoined callback is never called. Is there anything on the server side that I need to insure is running?

Hi @talothman, I've just tried it out and it seems to be working fine.

Are you running the "demo server" locally? https://github.com/gamestdio/colyseus-unity3d#running-the-demo-server

If you still have an error after having the demo server running, could you provide the stack trace?

Cheers

@endel Apologies. Was running the server in your main repo. :/

Small other issue in the Unity client.

It would seem that connecting two Unity clients generates an ArgumentException caused by the server giving the two clients the same ID. When attempting to connect another client, the local table that keeps track of existing players refuses to add the new client seeing as it's key already exists in the table. Any ideas why this is happening?

@talothman I had a similar issue. I realized that the client is trying to instantiate the player twice. Add this to the top of your OnPlayerChange in the "add" opratin:

if (players.ContainsKey(changePathId)) { return; }