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); }); }
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); }); }