Wednesday 6 May 2015

"Android & Microcontrollers Bluetooth plugin" future native support


Calling any Native/Java method is computationally expensive. It is highly advisable to keep the number of transitions between managed and native/Java code to a minimum, for the sake of performance and also code clarity" This applies for any plugin available for Unity, or any Managed to Unmanaged code communication. So I designed the plugin to do so without your intervention most of the time!. All reading methods won't actually make any plugin call unless there's data available, and that call is just to notify the plugin that data has been read. But who is responsible for data communication between the Plugin and Unity?, data will be sent automatically when needed according to your configurations of the "BtConnector UI Editor". Defining how many bytes you need in the buffer and when they're sent to your app is very important and critical for performance, using the "BtConnector UI Editor --BtConnector inspector" is easy, just try to alter its options, and you will understand.

This approach works nicely for most of us, minimizing data transition isn't an option for others, because they need real-time data, and they deal with high Baud Rates, even though you can do that with the current plugin, you will sacrifice a drop in Frame Rate.

The solution will be to let you add your own code to the plugin with ease, so you will be able to code your own data logic handling functionality away from unity, and that's what I'm working on now. I'm really bad with deadlines, because this isn't my main job, so I won't say anything about when this will be released. Also notice that I might never release it, if I found out that it just complicate the usability of the plugin, but till now I can't see why it couldn't be an easy and handy functionality for you.

No comments:

Post a Comment