- Home /
Android build error with 'UnityEngine.SocialPlatforms.GameCenter.'
I've integrated leaderboards and achievements into my game for both iOS (Game Center) and Android (Google Play). Everything works fine for iOS, but when I go and build for Android, it get the following error during the building process:
"error CS0234: The type or namespace name GameCenter' does not exist in the namespace
UnityEngine.SocialPlatforms'. Are you missing an assembly reference?"
Now, my immediate thought is that surely I'm not supposed to use the 'UnityEngine.SocialPlatforms.GameCenter' class for the Android version, but looking at Unity's documentation, they don't give any other classes specific for Google Play.
Perhaps the SocialPlatforms may not be needed for Google Play integration, but it's needed for functions like Social.ShowAchievementsUI(), which are being called on Android.
If I comment out 'UnityEngine.SocialPlatforms.GameCenter', the game builds successfully, but then there are all kinds of issues with the Google Play login pop-up continuously appearing and the game never actually transitioning to/accessing Google Play itself to review leaderboards/achievements.
Has anyone run into this issue before and resolved it? Thanks in advance for any help!