Array handling in colyseus.

How to get array in unity from colyseus state?


hi @ahtashamabbasse, not sure if this was already replied on Discord, I'll post here anyway!

you can listen to your hand structure using something like this:

room.Listen("hands/:index/:attribute", this.OnHandChange);

// ...
void OnHandChange(DataChange change)
	Debug.Log("has changed to");

The callback will be called for each attribute you have on each item in your array. Here's the logs I've got from this:

0_1549735199435_Screenshot 2019-02-09 at 15.54.37.png

thanks for your reply it means alot for us. We will try it.