public void UnlockAchievement(string achievementId)
        {
            ITask <HuaweiMobileServices.Utils.Void> task = achievementsClient.ReachWithResult(achievementId);

            task.AddOnSuccessListener((result) =>
            {
                Debug.Log("[HMS GAMES] UnlockAchievements SUCCESS");
                OnUnlockAchievementSuccess?.Invoke();
            }).AddOnFailureListener((exception) =>
            {
                Debug.Log("[HMS GAMES] UnlockAchievements ERROR");
                OnUnlockAchievementFailure?.Invoke(exception);
            });
        }
コード例 #2
0
        public void UnlockAchievement(string achievementId)
        {
            ITask <HuaweiMobileServices.Utils.Void> task = achievementsClient.ReachWithResult(achievementId);

            task.AddOnSuccessListener((result) =>
            {
                Debug.Log("[HMS GAMES] UnlockAchievements SUCCESS");
                OnUnlockAchievementSuccess?.Invoke();
            }).AddOnFailureListener((exception) =>
            {
                Debug.LogError("[HMSAchievementsManager]: UnlockAchievement failed. CauseMessage: " + exception.WrappedCauseMessage + ", ExceptionMessage: " + exception.WrappedExceptionMessage);
                OnUnlockAchievementFailure?.Invoke(exception);
            });
        }