public static AvatarStatsView Load() { AvatarStatsView view = UIView.Load("Views/AvatarStatsView", OverriddenViewController.Instance.transform) as AvatarStatsView; view.name = "AvatarStatsView"; return(view); }
IEnumerator SignIn() { OnlineManager.Instance.SetServer(); yield return(StartCoroutine(OnlineManager.Instance.StartLogin(_username, _password))); //Debug.Log(OnlineManager.Token); if (OnlineManager.Token != null && OnlineManager.Token != "") { yield return(StartCoroutine(OnlineManager.Instance.StartGetPlayer(OnlineManager._playerID))); if (OnlineManager.Instance.PlayerReponseData.player.gamemaster) { GameManager.Client = false; SceneManager.LoadScene("Moderator"); } if (!OnlineManager.Instance.GetRequestFailure) { if (OnlineManager.Instance.PlayerID == null || OnlineManager.Instance.PlayerReponseData.status != "ok") { LoadingAlert.FinishLoading(); HTTPAlert.Present("Login Error", OnlineManager.Instance.Error, null, null, true); } else { yield return(StartCoroutine(OnlineManager.Instance.StartGetGame())); yield return(StartCoroutine(OnlineManager.Instance.StartGetGear())); Database.Instance.BuildAllData(); Database.Instance.BuildGearList(); PathManager.Instance.Initialize(); if (!Avatar.Instance.Embodied) { UIViewController.ActivateUIView(AvatarCreationView.Load()); UIViewController.ActivateUIView(AvatarStatsView.Load()); } LoadingAlert.FinishLoading(); Deactivate(); } } } }