Post

Replies

Boosts

Views

Activity

Reply to ShowsCompletionBanner for GKAchievement is not shown
same issue on macOS platform,i use unity platform for build here my code : public class Achievement { public AchievementType Type; public int Value; public string ID; public Achievement(AchievementType type, int value, string id) { Type = type; Value = value; ID = id; } public async void Unlock() { var achievements = await GKAchievement.LoadAchievements(); var achievement = achievements.FirstOrDefault(a => a.Identifier == ID); achievement ??= GKAchievement.Init(ID); Debug.Log("Achievement will be unlocked" + ID); Debug.Log("Last Reported Date " + achievement.LastReportedDate); if (!achievement.IsCompleted) { Debug.Log("Achievement Unlocked" + ID); achievement.PercentComplete = 100; achievement.ShowCompletionBanner = true; GKAchievement[] achieves = {achievement}; await GKAchievement.Report(achieves); Debug.Log("Achievement Reported" + ID); } else { Debug.Log("Achievement Already Unlocked" + ID); } } }
May ’24