using UnityEngine; using System.Collections; using AX.MessageSystem; using AX.NetworkSystem; public sealed class MessageSystem : MonoBehaviour { void Awake() { DontDestroyOnLoad(gameObject); } void Update() { MessageDispatcher.Update(); } public void OnDisable() { MessageDispatcher.Clear(); } public void OnApplicationQuit() { NetworkManager.Default.SendRequestAsync("LOGOUT_REQUEST", MySelf.mySelf.ID); } }