private void OnLoginServerMessage(LoginToClient message) { if (message.Success) { if (message.Player != null) { Enter.player = message.Player; SceneManager.LoadScene("Enter", LoadSceneMode.Single); } else { Debug.Log("成功"); } } else { Debug.Log("失败"); } }
private void OnLoginServerMessage(LoginToClient message) { if (message.Success) { if (message.Player != null) { player = message.Player; RefreshRolesShow(); } if (message.SessionCert != null) { NetworkMgr.Instance.Cert = message.SessionCert; Debug.Log("成功:" + NetworkMgr.Instance.Cert.UUID + " Address:" + message.GateIP + " Port:" + message.GatePort); NetworkMgr.Instance.ConnectGame(message.GateIP, message.GatePort, message.GateWebPort); var req = new ConnectGateReq(); req.SessionCert = message.SessionCert; NetworkMgr.Instance.Request(CMD.ConnectGateReq, req.ToByteString(), OnRoleEnterCallback); } } else { Debug.Log("失败"); } }