Hi there,
i am using Unity3D for client and i have realy big trouble with sending data throught some Components.
For example in the scene root i have ColyseusClient object with script where i am creating room etc (like in example).
Then i have Player gameobject with some component e.q. SendMovePosition Component.
- How to send message through this SendMovePosition Component (how to use Colyseus Room there)?
I cant make Room instance static inside ColyseusClient. - How to pack data to json via Unity3d? Right now i had this idea to pack this manualy like
(string.Format(@"{""test"":""value"", ""x"": ""{0}"", ""y"": ""{1}""}", hit.point.x, hit.point.z));
but is there any other (build-in) option?
Hope you will help me because i really want to understand this!