- Home /
Can you export a Unity game as an Android library?
I'd like to know if it's possible to export a Unity game as an Android library that can be included in another Android project, since I'd like to add a game to an existing Android app. Is this possible? If so, is there also a way to do something similar for iOS?
Answer by sethuraj · Dec 11, 2017 at 09:51 AM
Yes you can.
Go to File>Build Settings.
Make sure the target platform is set to Android
Change the Build System from 'Internal(Default)' to 'Gradle(New)'
This will make Unity to build an android studio project instead of an APK file. You can use build to import as module into your android studio project. Here is a post (Credits: David Beloosesky) explaining the steps in detail. In this way you can launch unity activity from you native application activity.
Hope it helps.!
Thank you very much! I'll have to look further into this, but it sounds like this method could meet my requirements.
Do you know if something similar can be done with iOS?
You can build your unity app into and XCode project and integrate it with an exising iOS app.Have a look at this link
Answer by ahmedaniss · Dec 19, 2020 at 04:12 AM
export to android here : https://youtu.be/4DbQaGqA5Xo