We used to use instance methods in C#, but changed them to static methods. This is fine for the iOS guys who are using mono methods to call back to the native code, but I don’t know how to accomplish this in Android. Before we were using UnitySendMessage, but this needs an object to call it on. How do I call a static class method in C# from Android with the least effort. I’ll provide an example of what I mean. Thank you!
C#:
public class Example : MonoBehaviour
{
public static void DoStuff(string text)
{
// Do stuff with text
}
}
Java:
public class Test
{
// Call C# static method
// Used to use UnityPlayer.UnitySendMessage when method was instance
}