暂存
This commit is contained in:
1 parent
b075279a14
commit
26e4e81402
12 files changed
+2723
-2356
No files matched your search
@@ -209,9 +209,11 @@ namespace Assets.Scripts
|
||||
}
|
||||
public static void CallAndroidMethod(string methodName,params object[] args)
|
||||
{
|
||||
#if UNITY_ANDROID && !UNITY_EDITOR
|
||||
AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
|
||||
var activity = jc.GetStatic<AndroidJavaObject>("currentActivity");
|
||||
activity.Call(methodName, args);
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void showLoadingExtension(this GameObject game)
|
||||
@@ -224,7 +226,7 @@ namespace Assets.Scripts
|
||||
var newLoading = MonoBehaviour.Instantiate(Resources.Load<GameObject>("UI/Prefab/Common/Mobile/Loading"));
|
||||
#else
|
||||
var newLoading = MonoBehaviour.Instantiate(Resources.Load<GameObject>("UI/Prefab/Common/Loading"));
|
||||
#endif
|
||||
#endif
|
||||
newLoading.name = "Loading";
|
||||
newLoading.GetComponent<RectTransform>().position = new Vector3(Screen.width / 2, Screen.height / 2, 0);
|
||||
newLoading.transform.SetParent(game.transform);
|
||||
|
||||
Reference in new issue
Block a user