unityPlayer = new AndroidJavaClass("com.xxx.xxx.MainActivity"); curActivity = unityPlayer.GetStatic<AndroidJavaObject>("m_PayProxy");// MainActivity 类的字段 curActivity.Call("setGameObject", gameObject.name);
AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
AndroidJavaObject activity = jc.GetStatic<AndroidJavaObject>("currentActivity"); // MainActivty
activity.Call("func")
AndroidJavaClass ssdk = new AndroidJavaClass("cn.sharesdk.unity3d.ShareSDKUtils");// Java Class
ssdk.CallStatic("setGameObject", gameObject); // 静态函数 ssdk.CallStatic<bool>("isValid", platform); // 有返回值的函数
// 1.Unity3d GameObject 2.GameObject 绑定的脚本函数 3.参数
UnityPlayer.UnitySendMessage(m_GameObject,"Message","onBuyProp.....");