google 登录暂存

This commit is contained in:
Caiyanpeng committed 2022-01-19 13:42:12 +08:00
1 parent 45b3ee5bbc
commit 58a8233697
21 files changed
+355 -102

No files matched your search

+14
View File
@@ -274,6 +274,20 @@ namespace Assets.Scripts
#endif
}
public static bool CheckGooglePlayServices()
{
#if UNITY_ANDROID && !UNITY_EDITOR
AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
var activity = jc.GetStatic<AndroidJavaObject>("currentActivity");
return activity.Call<bool>("CheckGooglePlayServices");
#elif UNITY_EDITOR
return true;
#else
return false;
#endif
}
public static void showLoadingExtension(this GameObject game)
{
game.SetActive(true);