tag:blogger.com,1999:blog-2627044686641246157.post7766972581052187001..comments2023-10-16T07:03:02.728-07:00Comments on my gaming project: Unity, Futile & C# - Part 2mygamingprojecthttp://www.blogger.com/profile/11439127464517194421noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-2627044686641246157.post-54543818062609756742013-05-14T23:02:37.413-07:002013-05-14T23:02:37.413-07:00Not sure if this is you asking the question but tr...Not sure if this is you asking the question but try here:<br /><br />http://stackoverflow.com/questions/16554445/unity4-and-prime31-game-center-plug-in-eventmygamingprojecthttps://www.blogger.com/profile/11439127464517194421noreply@blogger.comtag:blogger.com,1999:blog-2627044686641246157.post-19542631058585706092013-05-14T16:39:36.762-07:002013-05-14T16:39:36.762-07:00Thanks.... yeah I had originally used PlayerPrefs ...Thanks.... yeah I had originally used PlayerPrefs to track a player's achievements... And I would delete those prefs should another player log in to the GC from in the game... I had it working quite perfectly.<br /><br />Then Prime said I should be using getAchievements method to load the current players data.... I spent 10 hours trying to make that happen! I'm still new to C# and Events/Listeners, so it's been impossible for me. Someone finally said that i need to do this...<br /><br />// Fired when loading achievements completes successfully<br />public static event Action> achievementsLoaded;<br /><br />"Just loop through and check for yourself"<br /><br />Problem is, I have no clue how to do this. I know how to loop etc, but not sure how to do it with an event and what it spits out.Nici Ghttps://www.blogger.com/profile/02357825062962431472noreply@blogger.comtag:blogger.com,1999:blog-2627044686641246157.post-20430955601310790122013-05-14T14:18:43.634-07:002013-05-14T14:18:43.634-07:00Hi Nici G
It sounds like you aren't setting y...Hi Nici G<br /><br />It sounds like you aren't setting your achievement to 100%.<br /><br />First up on my main page I do something like this<br /><br /> // Do gamecenter stuff ... Is GC available?<br /> if(GameCenterBinding.isGameCenterAvailable())<br /> {<br /> // Yep looks like it is so authenticate the player;<br /> GameCenterBinding.authenticateLocalPlayer();<br /> GameCenterBinding.retrieveAchievementMetadata();<br /> GameCenterBinding.showCompletionBannerForAchievements();<br /> }<br /><br />Then when checking an achievement I do something like:<br /> if(Score == 1800 && !PlayerPrefs.HasKey("1800"))<br /> {<br /> GameCenterBinding.reportAchievement( "01", 100.0f );<br /><br /> PlayerPrefs.SetInt("1800", 1);<br /> }Anonymoushttps://www.blogger.com/profile/17200953416732314900noreply@blogger.comtag:blogger.com,1999:blog-2627044686641246157.post-56413537934080620012013-05-14T04:54:09.364-07:002013-05-14T04:54:09.364-07:00Hey - I've been using Prime31 Game Centre plug...Hey - I've been using Prime31 Game Centre plug-in and came across an issue that if an achievement has already been rewarded to the player, if they satisfy the parameters of that achievement again the banner will trigger again...<br /><br />I've been looking for a way around this that was simple, but no luck. What did you do?Nici Ghttps://www.blogger.com/profile/02357825062962431472noreply@blogger.com