Achievement が完了したときにデフォルトの iOS バナーを表示します
これは iOS 5.0 以上でのみ動作し、それより前のバージョンでは何もしません。 Javascript コードサンプル:
function Start () {
GameCenterPlatform.ShowDefaultAchievementCompletionBanner(true);
Social.localUser.Authenticate( function(success) {
if (success)
ReportAchievement();
else
Debug.Log ("Failed to authenticate");
});
}
function ReportAchievement() {
Social.ReportProgress( "Achievement01", 100, function(result) {
Debug.Log ( result ? "Reported achievement" : "Failed to report achievement");
});
}
C# サンプル:
using UnityEngine; using UnityEngine.SocialPlatforms.GameCenter; public class DoAchievement : MonoBehaviour { void Start () { GameCenterPlatform.ShowDefaultAchievementCompletionBanner(true); Social.localUser.Authenticate( success => { if (success) ReportAchievement(); else Debug.Log ("Failed to authenticate"); }); } void ReportAchievement() { Social.ReportProgress( "Achievement01", 100, (result) => { Debug.Log ( result ? "Reported achievement" : "Failed to report achievement"); }); } }