This is my first time using Unity, and I want to integrate it into an already existing Android app.
From what I've read, you need to package your Android project into a jar file. Since you can't include the resource folder in the jar, how do I handle all of the resources for my app? The app also uses the ActionBarSherlock and ViewPagerIndicator libraries which have resources of their own as well.
I basically just need a way to click a button on Android and pop up an Activity containing the Unity stuff. I want the rest of the app to be native Android code. Thanks for the help!
For Unity to be able to export your game as an APK, you need to install the Android Build Support module on the Unity Editor that you are using to build your project. Under the Installs tab of Unity Hub, if you find the circled icon below your editor version, that means that Android Build Support is installed for it.
Once you have downloaded Android Studio, you need to add the Android SDK path to Unity. See Unity documentation on Android SDK/NDK setup for steps on how to do this. Once you have your Android developer environment set up, you can open your Unity Project.
I figured it out. I was following these directions but kept getting various error messages including ClassNotFound exceptions.
It turns out the way that ADT 17 handles .jar files broke this method of integrating Unity into Eclipse. After hours of searching, here's the fix I came up with:
Instead of adding classes.jar to your build path, you should just copy the classes.jar file into the /lib
directory of your project, and everything should work properly.
Hi Below are the steps to follow
Create a unity project using android pro.
import com.unity3d.player.UnityPlayerActivity;
public class MainActivity extends UnityPlayerActivity
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With