Unity调安卓
AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); AndroidJavaObject jo = jc.GetStatic<AndroidJavaObject>("currentActivity"); jo.Call("具体方法名");
安卓调Unity
mUnityPlayer.UnitySendMessage("GameObject名", "函数名", "参数");
Unity调安卓
AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); AndroidJavaObject jo = jc.GetStatic<AndroidJavaObject>("currentActivity"); jo.Call("具体方法名");
安卓调Unity
mUnityPlayer.UnitySendMessage("GameObject名", "函数名", "参数");