Example #1
0
        public void Send(NetworkId objectid, ushort componentid, string message)
        {
            var msg = ReferenceCountedSceneGraphMessage.Rent(message);

            msg.componentid = componentid;
            msg.objectid    = objectid;
            scene.Send(msg.buffer);
        }
Example #2
0
        public void Send(NetworkId objectid, ushort componentid, string message)
        {
            var bytes = Encoding.UTF8.GetBytes(message);
            var msg   = ReferenceCountedSceneGraphMessage.Rent(bytes.Length);

            Array.Copy(bytes, 0, msg.bytes, msg.start, bytes.Length);
            msg.componentid = componentid;
            msg.objectid    = objectid;
            scene.Send(msg.buffer);
        }
Example #3
0
 public void SendJson <T>(NetworkId objectid, T message)
 {
     Send(objectid, componentId, JsonUtility.ToJson(message));
 }
Example #4
0
 public void Send(NetworkId objectid, ushort componentid, ReferenceCountedSceneGraphMessage message)
 {
     message.objectid    = objectid;
     message.componentid = componentid;
     scene.Send(message.buffer);
 }