Creating a Simple Unity plugin to Android

preview_player
Показать описание
In this video I will create a very simple, and extremely easy plugin to allow us to interact with the Native Java code on an android device. This is very simple and does not interact with any UI components, but it does illustrate a good base for creating a Unity3d Plugin for Android/Java

Here is a link to the Unity3d Plugins playlist

And Here is my Website

And finally I have uploaded code
Рекомендации по теме
Комментарии
Автор

I've seen a few tutorials and read a few docs and such, and this one is by far the most instructive. Also kudos on speeding it up, it's easy enough for us to pause - but I dread tutorials where the person just drags on and on

MarioGonzalez-lojk
Автор

Seems this java tutorial is a bit popular, Im getting requests for more java tutorials and will be putting up some good stuff as soon as I get the chance. I am working through a heavy crunch time at my current job and until this project is out, I will need to concentrate completely on it.

Thank you all for your requests, I now have a list of things to do when I get back to these videos and I hope this project does not take forever, however February should be much less hectic, possibly sooner. But that is the deadline, so I will get back to making these videos and helping the world as soon as I can....

Thanks again for the messages and feel free to keep requesting things.

SuperLazyCoder
Автор

No problem emredodii, I am glad it was helpful. I am trying to get more up, however tight deadlines at work require my immediate attention. Next in line is Windows, then Android C++ plugin.

SuperLazyCoder
Автор

Very helpful. Thank you! Although I missed the difference between AndroidJavaClass and AndroidJavaObject the first time because I wasn't paying attention and one of the youtube information messages kind of blocked it.

modalnodes
Автор

This is a great tutorial, thanks a lot!

EmirKuljanin
Автор

Hey lazy, nice videos. Would you happen to know how to summon a notification from Unity? Im having a lot of trouble with that

FenrirVampire
Автор

How can I do the "convert to library" part in Android Studio instead of eclipse?

rodolink_
Автор

Thx this is a great tutorial, but in unity you need to change the Bundle Identifier in the Build settings and put com.lokisystems.oshook ?

niezebenmansour
Автор

Hi, Is there anyway to implement Sprite functionality through Android plugin. so can you plz help me with this.

bharatbhandari
Автор

Hi The Lazy Coder, Thanks for sharing this awesome tutorial~
I'd like to ask if I want to access some native SDK does this method still applies??

Such as access Bluetooth/Gallery stuff...

I've done some research and found that accessing native SDK requires extending UnityPlayerActivity and modify AndroidManifest.xml

But I was wondering if your method can be used to create a function that calls native SDK underneath without modifying AndroidManifest.xml??

This method seems only work for passing values from android native functions...

Thanks for sharing!

KeKeever
Автор

Could you please make a tutorial on google plus button in unity

souvikroy
Автор

Hello, coder, it is a nice tutorial. You are accessing the functions from java code that have pre-defined output in unity. Can we do reverse??
And i also wanted to send continuous data(some sensor data), which i am able to get in android, to unity. Will that work through this method??

jai
Автор

I am sorry that I dont know this. It has been a while since I did Unity Plugins, and I never used Android Studio.

SuperLazyCoder
Автор

It's greate tutorial. Very usefull to me, but I have a problem trying to make my own plugin. I need to make a plugin that access native bluetooth funcionality, and I made the steps you show in this video. I also added permissions needed to use bluetooth, but for some reason the manifest isn't merging when compiled in Unity. Do you know what could be the reason? I also tried to make an aar file instead of a jar, but this time it throws me an error saying that it cannot merge the manifest. Can you help me with this please?

facundodellarosa
Автор

it's great.  androidmanifest.xml is not to needs to be modified ? 

shockalice
Автор

How would I do this on android studio. I don't know how to change it to a library. I can make a module that's library but don't know the proper jar file to use.

niknar
Автор

how can you call yourself Lazy coder after having done so much..u dont have right to do so :p

vmohakrish