I am trying to create an android plugin in Java. When I am trying to return some message back to Unity using
UnityPlayer.UnitySendMessage("testObject", "testMethod", "sample message");
When running the code from unity,
I get following exception
SendMessage: Object testObject is not found!
I have testObject as game object in my scene.
I am able to figure out what is the issue here.
One other approach I thought can work is if I can use GetComponent<>
, but for that I have to pass the gameObject (testObject) to java about which I have no idea.
Can anybody help me in this?
The name of the GameObject must be "testObject" Check if is true: http://docs.unity3d.com/Documentation/ScriptReference/Object-name.html
You need to describe better. Can be a lot of things
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With