Reputation: 21
i want to call a non-static void method of java from Unity.
I read the answer at ( Unity3d integration with android).
In this What is "currentActivity" ? am getting an error "no static field with name='currentActivity' ...." etc
code :
AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
AndroidJavaObject activity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
Is UnityPlayer is a class in Java ? What is "currentActivity" ?
Upvotes: 2
Views: 1626
Reputation: 24231
"CurrentActivity" might be the public static class name where your java function is declared.
Upvotes: 1