- Home /
Not able to send message from java to Unity using UnityPlayer.UnitySendMessage
Hello:
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?
Your answer
Follow this Question
Related Questions
BroadcastReceiver onReceive does not work (custom Unity Android plugin) 1 Answer
Web plugin like uWebKit for Android? 0 Answers
How to alter the Android Manifest to use my ad-displaying activity in Unity? 0 Answers
Using AndroidJavaObject.CallStatic to retrieve a return value 0 Answers
GooglePlayGames plugin path not correct? 0 Answers