在 Unity 中 android 身份验证和成就首选哪个 class
Which class is preferred for android authentication and achievements in Unity
Unity、PlayGamesPlatform 或 Social 中 android 身份验证和成就首选哪个 class?
我的意思是 PlayGamesPlatform 在任何情况下都用于
PlayGamesPlatform.Activate();
但我可以做到
PlayGamesPlatform.Instance.Authenticate(SignInCallback, false);//auth
PlayGamesPlatform.Instance.IncrementAchievement(
GPGSIds.achievement_git_gud, //achievment code
1,//increment size
(bool success) => {
callback
});
或
Social.localUser.Authenticate((bool success) => {//auth
//auth callback
};
Social.ReportProgress(
GPGSIds.achievement_git_gud, //achievment code
1,
(bool success) => {
// handle success or failure
});
});
我更喜欢哪个class?
我会选择 Unity 提供的那个,因为它很可能更新得更频繁。 PlayGamesPlatform 似乎是在 Social 可用之前作为插件发布的。 Social 似乎也是一种更独立于平台的方法。不过,如果您需要更多 android 特定的功能,看起来它们可以一起使用。 - 来自评论的回答。
Unity、PlayGamesPlatform 或 Social 中 android 身份验证和成就首选哪个 class? 我的意思是 PlayGamesPlatform 在任何情况下都用于
PlayGamesPlatform.Activate();
但我可以做到
PlayGamesPlatform.Instance.Authenticate(SignInCallback, false);//auth
PlayGamesPlatform.Instance.IncrementAchievement(
GPGSIds.achievement_git_gud, //achievment code
1,//increment size
(bool success) => {
callback
});
或
Social.localUser.Authenticate((bool success) => {//auth
//auth callback
};
Social.ReportProgress(
GPGSIds.achievement_git_gud, //achievment code
1,
(bool success) => {
// handle success or failure
});
});
我更喜欢哪个class?
我会选择 Unity 提供的那个,因为它很可能更新得更频繁。 PlayGamesPlatform 似乎是在 Social 可用之前作为插件发布的。 Social 似乎也是一种更独立于平台的方法。不过,如果您需要更多 android 特定的功能,看起来它们可以一起使用。 - 来自评论的回答。