usingGooglePlayGames;usingUnityEngine.SocialPlatforms;...// unlock achievement (achievement ID "Cfjewijawiu_QA")Social.ReportProgress("Cfjewijawiu_QA",100.0f,(boolsuccess)=>{// handle success or failure});
usingGooglePlayGames;usingUnityEngine.SocialPlatforms;...// increment achievement (achievement ID "Cfjewijawiu_QA") by 5 stepsPlayGamesPlatform.Instance.IncrementAchievement("Cfjewijawiu_QA",5,(boolsuccess)=>{// handle success or failure});
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-27 UTC。"],[],[],null,["# Achievements in Unity games\n\nThis topic describes how to use Play Games Services achievements in Unity\ngames. It assumes that you've set up your project and the\nGoogle Play Games plugin for Unity, as discussed in the\n[Get started guide](/games/pgs/unity/unity-start).\n\nCreate an achievement\n---------------------\n\nWhen you set up your project and plugin, create the achievements in\nGoogle Play Console and then update the plugin with the Android resources\nfor your achievements. For details about creating achievements in\nPlay Console, see the\n[achievements guide](/games/pgs/achievements#create_an_achievement).\n\nReveal and unlock an achievement\n--------------------------------\n\nTo unlock an achievement, use the **Social.ReportProgress** method with a\nprogress value of 100.0f: \n\n using GooglePlayGames;\n using UnityEngine.SocialPlatforms;\n ...\n // unlock achievement (achievement ID \"Cfjewijawiu_QA\")\n Social.ReportProgress(\"Cfjewijawiu_QA\", 100.0f, (bool success) =\u003e {\n // handle success or failure\n });\n\nAccording to the expected behavior of\n[Social.ReportProgress](http://docs.unity3d.com/Documentation/ScriptReference/Social.ReportProgress.html),\na value of 0.0f means the achievement is revealed and a progress of 100.0f\nmeans the achievement is unlocked.\n\nTo reveal an achievement that was\npreviously hidden without unlocking it, call **Social.ReportProgress** with\na value of 0.0f.\n\nIncrement an achievement\n------------------------\n\nIf the achievement is incremental, the Play Games implementation of\n**Social.ReportProgress** will try to adhere to the\nexpected behavior according to Unity's social API. The behavior might not be\nidentical, though, so we recommend that you don't use **Social.ReportProgress**\nfor incremental achievements. Instead, use the\n[PlayGamesPlatform.IncrementAchievement](/games/services/unity/v2/api/class/google-play-games/play-games-platform#incrementachievement) method, which is a\nPlay Games extension. \n\n using GooglePlayGames;\n using UnityEngine.SocialPlatforms;\n ...\n // increment achievement (achievement ID \"Cfjewijawiu_QA\") by 5 steps\n PlayGamesPlatform.Instance.IncrementAchievement(\n \"Cfjewijawiu_QA\", 5, (bool success) =\u003e {\n // handle success or failure\n });\n\nShow the achievements UI\n------------------------\n\nTo show the built-in UI for all achievements, call\n**Social.ShowAchievementsUI**. \n\n using GooglePlayGames;\n using UnityEngine.SocialPlatforms;\n ...\n // show achievements UI\n Social.ShowAchievementsUI();"]]