Language

which object is Plugins/API.dll attached to

I have a project that uses a API that is saved in Assets/Plugins/DataStreamer.dll. In the same project there is also AndroidJavaObject as a unity java plugin : Assets/Plugins/Android/libs/classes.jar (). This unity java plugin sends out data with a java method:

using com.unity3d.player.UnityPlayer ... UnityPlayer.UnitySendMessage("ObjectAReceivingScriptIsAttachedTo","methodName",Integer.toString(bytes)); So if I want to send data to the API DataStreamer.dll, I need to know ObjectAReceivingScriptIsAttachedTo.

The API itself isn't attached to any GameObject. If there are classes in the API, you can instantiate them in the normal way, with new, you don't use Unity's Instantiate() function, as well as call the exposed functions in it the normal way . Of course, you do need a script attached to a GameObject that will do these calls, or at least create a class that will do that, but that's a different question.

1 Reply

Duh. Found a solution: Gonna call some other function in an ordinary Unity script and create a bridge between JAvaAndroidPlugin and a API. Sry Was to quick to ask a question, before I really gave it a good thought. Aldo I am interested if someone knows the answer or another solution to a wrwpper function.