示例#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);
        }
示例#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);
        }
示例#3
0
 public void SendJson <T>(NetworkId objectid, T message)
 {
     Send(objectid, componentId, JsonUtility.ToJson(message));
 }
示例#4
0
 public void Send(NetworkId objectid, ushort componentid, ReferenceCountedSceneGraphMessage message)
 {
     message.objectid    = objectid;
     message.componentid = componentid;
     scene.Send(message.buffer);
 }