public void ShowAchievements() { if (!IsAuthenticated()) { Debug.Log(TAG + ": ShowAchievements failed! User is not authenticated! Trying to login..."); AuthenticateUser(success => { if (success) { _achievementClient.ShowAchievementList(() => { Debug.Log(TAG + ": User is authenticated! ShowAchievementList are showed!"); }, (exception) => { Debug.Log(TAG + ": ShowAchievementList ERROR - " + exception.WrappedExceptionMessage); }); } else { Debug.Log(TAG + ": ShowAchievementList connection is failed!"); } }); } else { _achievementClient.ShowAchievementList(() => { Debug.Log(TAG + ": User is authenticated! ShowAchievementList are showed!"); }, (exception) => { Debug.Log(TAG + ": ShowAchievementList ERROR - " + exception.WrappedExceptionMessage); }); } }
public void ShowAchievements() { if (HMSAccountManager.Instance.HuaweiId != null) { IAchievementsClient achievementsClient = Games.GetAchievementsClient(); achievementsClient.ShowAchievementList(() => { Debug.Log("[HMS GAMES:] ShowAchievements SUCCESS"); OnShowAchievementsSuccess?.Invoke(); }, (exception) => { Debug.Log("[HMS GAMES:] ShowAchievements ERROR"); OnShowAchievementsFailure?.Invoke(exception); }); } }
public void ShowAchievements() { if (HMSAccountManager.Instance.HuaweiId != null) { IAchievementsClient achievementsClient = Games.GetAchievementsClient(); achievementsClient.ShowAchievementList(() => { Debug.Log("[HMS GAMES:] ShowAchievements SUCCESS"); OnShowAchievementsSuccess?.Invoke(); }, (exception) => { Debug.LogError("[HMSAchievementsManager]: Show Achievements failed. CauseMessage: " + exception.WrappedCauseMessage + ", ExceptionMessage: " + exception.WrappedExceptionMessage); OnShowAchievementsFailure?.Invoke(exception); }); } }