Utility 类,用于发送没有内容的网络消息。
using UnityEngine; using UnityEngine.Networking; using UnityEngine.Networking.NetworkSystem;
public class Test { void SendNotification() { var msg = new EmptyMessage(); NetworkServer.SendToAll(667, msg); } }
| Deserialize | 此方法用于通过 NetworkReader 流填充消息对象。 |
| Serialize | 此方法用于通过消息对象填充 NetworkWriter 流。 |