Log in or register to post comments

how to call a c# function in eclipse ide?

March 14, 2011 - 11:20am #1

Hii guys,
I want to defined a function in c# in unity3d.I want to access the object or method of C# function in eclipse ide.e.g
I am defined a class in eclipse ide as
public classs MyClass extends com.qualcomm.QCARUnityPlayer.PlayerActivity{
}
how the C# functions defined in unity3d and what are procedures to access the function in java using eclipse ide.The defined class in java is as above given.

Re: how to call a c# function in eclipse ide?

March 22, 2011 - 8:15am #4

I found solution for this.we can use androidjavaObject and androidJavaclass for this.also we can pass message from java to c#.
UnityPlayer.sendMessage("Name of ur scene","methodName","parameterpassedtofunction");.

Re: how to call a c# function in eclipse ide?

March 16, 2011 - 11:11am #3

thankx kim

Re: how to call a c# function in eclipse ide?

March 14, 2011 - 12:40pm #2

As far as I know this isn't possible. Java and native code can't access methods in the C# Unity scripts. Instead, your Unity script has to call a native or Java method. You might try asking in the Unity forums though, they will know for sure.

Also, I suggest reading through Unity's documentation on this subject: http://unity3d.com/support/documentation/Manual/Plugins.html

- Kim

Log in or register to post comments