简体   繁体   中英

Game Center achievement banners not displaying on unlock (Unity)

My app (iOS) uses Game Center for its leaderboard functionality as well as its achievement system. I am using the built in libraries for Game Center integration for unity. My achievements work as intended, however when a user unlocks an achievement, there is no notification banner to indicate that the user has unlocked it. Naturally I have

GameCenterPlatform.ShowDefaultAchievementCompletionBanner(true);

with the header using

UnityEngine.SocialPlatforms.GameCenter;

and the standard authentication script before performing any actions, but despite my greatest efforts, the live version of the app does not display banner notifications upon unlocking an achievement. Any insight is appreciated.

I feel like such an idiot, but the solution was quite simple. Download the GKAchievementReporter.unitypackage and import it in to your project. Replace your Social.ReportProgress() method with

GKAchievementReporter.ReportAchievement(achievementID, progress, showsCompletionBanner);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM