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?