First, in the unity of the first to write your own function code
Second, unity and then export the project file android
Third, the new project androidstudio
Fourth, copy the jar package unity export libs folder to the next as project libs, then right-click to add to the database (Add As Library)
Fifth, copy the unity export project folder in the assets and jniLibs to as the src / main below, and copy UnityPlayerActivity to Java below
Sixth, in UnityPlayerActivity class to write a few words on the bottom, this is just an example, a project you can find a place to write their own
Seven, in the xml configuration file into the Startup Items UnityPlayerActivity it's done
Reference: https://www.jianshu.com/p/31b8877de531
Reference: https://blog.csdn.net/zouxin_88/article/details/79149384
Reference: https://blog.csdn.net/u010407393/article/details/79423769