public void Send(NetworkId objectid, ushort componentid, string message) { var msg = ReferenceCountedSceneGraphMessage.Rent(message); msg.componentid = componentid; msg.objectid = objectid; scene.Send(msg.buffer); }
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); }
public void SendJson <T>(NetworkId objectid, T message) { Send(objectid, componentId, JsonUtility.ToJson(message)); }
public void Send(NetworkId objectid, ushort componentid, ReferenceCountedSceneGraphMessage message) { message.objectid = objectid; message.componentid = componentid; scene.Send(message.buffer); }