Combu  3.2.2
Unity API Documentation
Managing Achievements

In this section you will learn how to load the achievements and report a progress.

Loading Achievements descriptions

To retrieve the list of achievements you can call CombuManager.platform.LoadAchievementDescriptions or CombuManager.platform.LoadAchievements (the latter form is preferred because you will not need to cast back from IAchievement to Achievement):

// Load the achievement descriptions
CombuManager.platform.LoadAchievements( (Achievement[] achievements) => {
Debug.Log("Achievements loaded: " + achievements.Length);
});

Reporting Progress

To report a new progress of the local user you need to call CombuManager.platform.ReportProgress, or you can call the method ReportProgress on a Score instance:

// Report a score of 1000 to the achievement ID '123'
CombuManager.platform.ReportProgress(1000, "123", (bool success, string error) => {
if (success)
Debug.Log("Success");
else
Debug.Log("Failed: " + error);
});
// Report a progress of 30% on an Achievement object,
// (previously loaded with LoadAchievements or created with <strong>CombuManager.platform.CreateAchievement</strong> and with <em>id</em> set)
myAchievement.percentCompleted = 0.3;
myAchievement.ReportProgress( (bool success, string error) => {
if (success)
Debug.Log("Success");
else
Debug.Log("Failed: " + error);
});