public void OnPageActive() { loginManager = gameObject.GetComponent <PlayfabLogin>(); feedbackText.text = ""; usernameText.text = loginManager.getDisplayName(); if (loginManager.isLoggedIn()) { GetLeaderboard(); } else { PlayfabUtils.OnError(feedbackText, "You must login first to see the leaderboard!"); } }
public void UpdateDisplayName() { if (!loginManager.isLoggedIn()) { PlayfabUtils.OnError(feedbackText, "Please login first!"); return; } if (nameInput.text == "") { PlayfabUtils.OnError(feedbackText, "New Display Name must not be empty!"); return; } var request = new UpdateUserTitleDisplayNameRequest { DisplayName = nameInput.text }; PlayFabClientAPI.UpdateUserTitleDisplayName(request, OnNameUpdated, OnError); }
public void OnPageActive() { loginManager = gameObject.GetComponent <PlayfabLogin>(); feedbackText.text = ""; leaveBtn.SetActive(false); playBtn.SetActive(false); usernameText.text = loginManager.getDisplayName(); enemyText.text = "Loading..."; if (loginManager.isLoggedIn()) { backBtn.GetComponent <Button>().interactable = false; StartMatchmaking(); } else { backBtn.GetComponent <Button>().interactable = true; PlayfabUtils.OnError(feedbackText, "You must login first to start matchmaking!"); } }