How to get Achievement progress list (U3DXT)

Hey guys,

I’ve been working on putting Game Center support into my iOS game using the U3DXT plugin and I am stuck on figuring out how to get the progress on achievements for the current player from Game Center.

I’ve got the Submitting progress down but I would like to be able to check at launch whether or not any progress and how much has been made on all achievements.

I’ve looked through the API and I think I’ve found the method which is

public static void LoadAchievements(
	Action<Object[], NSError> completionHandler

but I’m not that up to speed with coding so I can’t quite figure it out, ultimately I would like to fill and array with achievement progress.

Thanks for your time,

Hi, yes you would use the GKAchievement.LoadAchievements() call, passing it a delegate:

GKAchievement.LoadAchievements(delegate(object[] achievements, NSError error) {
	if (error != null) {
		Debug.Log("error: " + error.LocalizedDescription());
	} else {
		foreach (var obj in achievements) {
			GKAchievement achievement = obj as GKAchievement;
			double progress = achievement.percentComplete;
			// check progress