Exemplo n.º 1
0
    void Awake()
    {
        if (m_netManager != null)
        {
            Destroy(this.gameObject);
        }

        m_netManager = this;
        DontDestroyOnLoad(this.gameObject);

        //项目只能唯一一个地方使用RegisterLogCallback
        //Application.RegisterLogCallback(LogModule.Log);
        NetWorkLogic.SetConnectLostDelegate(ConnectLost);
        m_instance = this;
    }
Exemplo n.º 2
0
 public void OnInit()
 {
     NetWorkLogic.SetConnectLostDelegate(ConnectLost);
 }