How To Make Unity3d As An Activity In Android Studio?
Solution 1:
There is no direct way to do this, when you build your project from unity you will generate an apk file that will start the unity activity/engine at start
you have two approaches to do this:
Approach 1: switch platform for android in unity and compile your unity project to android studio project by checking the Google Android Project check box from the build settings window, this will generate an Android Studio project for you and you can open it and manipulate it as you like and change the starting activity to yours and launch unity activity when you want
Approach 2: Implement your activity in android studio and compile your code to jar or aar file and add it to unity as a plugin, now you need to manipulate the manifest in Unity its self to start from your activity and not unity's activity
I don't think the second way is that practical, the first is much better However, this means you need to compile a new project each time you want to edit something in the unity code, if your project in unity is finalized, this will work will for you, otherwise, you need to deal with compiling and not overriding your changes each time your self
Post a Comment for "How To Make Unity3d As An Activity In Android Studio?"