IAchievement and IAchievementDescription...

I can’t seam to find a proper tutorial or good reference towards the achievements implementation in Social.

What I understand;

IAchievement;

  • Is the current state of an achievement.
  • Should probably be a member variable of my own implementation of an achievement.
  • Is the bridge to update its state online.

IAchievementDescription;

  • Is the description (name, title, icon) or an achievement.
  • Is not really useful if you use an external display (Ex.: GameCenter, Steam)
  • Is useful if you display a list of achievement in your game.

I can get a list of existing IAchievement. However, I can’t seam to find a proper way to bind an IAchievement to my own internal class that perform checks and update to know if the achievement have been performed. Also, I’ll have to save that progress offline, probably in a PlayerPref in case the player is not online. On top, I’ll have to repush the current state of that achievement when the game get online again.

IAchievement and IAchievementDescription both have an ID, but nothing say they can be related to each other. Also, I don’t see how I’m supposed to use that ID for anything. Is it fixed? Does it change on each reload?

There’s also the Social.CreateAchievement, but that method doesn’t make any sense! It has no parameters. So how am I supposed to bind that created achievement to anything?

For steam you’ll need to use their internal API to add steam achievement.

Pretty funny I found this on the first result on google: http://cgcookie.com/unity/2011/12/16/creating-an-achievement-system/ or http://www.stevegargolinski.com/progress-a-free-achievement-framework-for-unity/ both seems pretty descent from a quick look at them.

I saw those, but they are old and don’t appear to be using Social.

Ah, Never heard of this “Social” before so I’m a bit lost, your sentence also gives much more sense now :smile:

http://docs.unity3d.com/Documentation/Components/net-SocialAPI.html

http://docs.unity3d.com/Documentation/ScriptReference/Social.html

Unity’s implementation of a generic centralized system to handle achievement and leaderboards. However, the documentation is lacking.