Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Social.CreateAchievement

static function CreateAchievement(): IAchievement;
static IAchievement CreateAchievement();
static def CreateAchievement() as IAchievement

Description

Create an IAchievement instance.

IAchievement achievement = Social.CreateAchievement();
	achievement.id = "Achievement01";
	achievement.progressCompleted = 100.0;
	achievement.ReportProgress( result => {
		if (result)
			Debug.Log ("Successfully reported progress");
		else
			Debug.Log ("Failed to report progress");
	});