Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

iOS Game Center Achievements Not Working

$
0
0
Alright so I'm implementing a Leaderboard and Achievement System in my game using Unity's Social Api, and so far the Leaderboard is working and I am able to send my scores and view them in the Game Center in Sandbox Mode, but the Achievement System doesn't want to work. And yes I am calling the ShowDefaultAchievementCompletionBanner in my start function. I'm not sure if its the way I'm writing the achievement Id is wrong or that I'm call the achievement function incorrectly. Bellow is an example of how I wrote my code: using UnityEngine; using System.Collections; using UnityEngine.SocialPlatforms; using UnityEngine.SocialPlatforms.GameCenter; private string iosFinishWorld01AchievementID = "com.company.name.a_world01"; void Start() { GameCenter.GameCenterPlatform.ShowDefaultAchievementCompletionBanner(true); LogIn (); } void LogIn () { Social.localUser.Authenticate((bool success) => { if (success) Debug.Log("You've successfully logged in"); else Debug.Log("Login failed for some reason"); }); } void UnlockWorld01Achievement () { Social.ReportProgress(iosFinishWorld01AchievementID, 100.0f, (bool success) => { if (success) Debug.Log("You've successfully Unlocked Achievement"); else Debug.Log("failed to get Achievement"); }); }

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>