• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by alesrazym · Jul 06, 2018 at 12:30 PM · export problem

How to setup Android project with Dynamic delivery module containing Unity?

Hello Unity developers,
I want to setup Android native project, that has new Dynamic delivery module, which contains Unity project.

I do export Unity project as Android Gradle poject and use the outputs within a separate Android module. When I do a single APK build, everything works fine. When I change module containing Unity to be Dynamic delivery module, Unity Activity fails to load with this error:

 E/mono: The assembly mscorlib.dll was not found or could not be loaded.
 E/mono: It should have been installed in the `/data/app/[app-package]-7C8S67iKRfjcl60CtXjYaw==/base.apk/assets/bin/Data/Managed/mono/4.5/mscorlib.dll' directory.  


Is it possible to setup project this way? Are there hardcoded references to assets to base.apk? Note: mscorlib.dll is not generated in "mono/4.5/" subdir, it is generated directly in "bin/Data"
What is recommended way to have unity module loaded on demand (not containing it in main APK)?
Thanks for hints

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by GaZnoDrone · Nov 22, 2019 at 07:00 AM

We are also trying to achieve the same thing. You can check out the latest discussion on this thread: https://forum.unity.com/threads/integration-unity-as-a-library-in-native-android-app-version-2.751712/page-2

Have you been able to succeed in any way?

I exported the project in 2019.3.11b as the structure for exporting a Gradle project is more android Studio compatible, you can read about it here: https://forum.unity.com/threads/using-unity-as-a-library-in-native-ios-android-apps.685195/

We haven't been able to get it to work yet, the android developers have a conflict saying the asset path are the same even though 2 different unity library module has been imported. I have asked this question in the thread mention earlier.
unityLibrary\src\main\assets\bin\Data\Managed\Metadata\global-metadata.dat this is the path that gets a conflict. They have changed and modified the path but still, when they try downloading the game and play, the app crashes. Locally in android studio IDE using the virtual Device it works.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image alesrazym · Nov 22, 2019 at 03:14 PM 0
Share

Thanks for the info. It seems like good possibility.

Finally we didn't need Dynamic Delivery, because we fit within 100$$anonymous$$B AP$$anonymous$$ file size.

We use Unity as module, which works fine except AAB. At first, we used it and updates were smaller and worked fine. Later, it went completely broken when installed via Google Play store. Google Support doesn't help. So we moved back to "dummy" AP$$anonymous$$.

We also had to run Unity in separate process, because it was unable to finish not killing itself. I wasted a lot of time trying unity to finish without crash. $$anonymous$$aybe never versions behave beter.

Although we setup Unity as library before it was officially supported, we haven't ever tried to use two or more such libraries.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

86 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Instantiate prefab does not work for Android 1 Answer

Unity as a Simulation Visualization 0 Answers

Issue Exporting Addressable Asset 0 Answers

Unity 2017.1.0b7 WebGL Export Crash il2cpp 2 Answers

Exportation to unity 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges