Call C# from Java


I am trying to call a static C# function from java after exporting the android project to eclipse.Does anyone have any ideea?

Lets say i have this in c#

public class a{
 public static void method(string param)
 Debug.Log("param "+param);

I’ve tryed

UnityPlayer.UnitySendMessage("a","method","param string");

but with no luck…

I know JNI does this very easily with C and C++ assemblies and libraries - see if it will work with managed world as well. You might have to create some kind of intermediary that your Java would invoke, which in turn, would invoke your C# code (worth a try if JNI won’t allow you to make a direction invocation).

The first argument in UnitySendMessage is the name of the GameObject. No the class.