- Home /
How to include assets in an android plugin (aar)?
I'm building a plugin for android that includes a couple of assets in the various aar files ~ however when I build my test project the assets are missing from the apk. If I export the android project and build from Android Studio the assets are included. I'm not sure why this is happening or what I can do so that the assets are included when Unity makes the build.
The assets in the aar file are located in:
plugin.aar/assets/*
plugin.aar/assets/fonts/*
When I build with Unity.
unityproject.apk/assets/* <-- this folder is empty
When I build with Android Studio I get the results I'm looking for.
androidstudioproject.apk/assets/*
androidstudioproject.apk/assets/fonts/*
Answer by Yury-Habets · May 10, 2015 at 07:25 PM
This is a valid concern. Please submit a bug report with a repro project, and we'll handle that.
Thanks!
Thank you, I've submitted a bug report. In the interim, extracting the assets and including them in /Assets/Plugins/Android/assets/ seems to resolve the issue.
Answer by Ruslan Grigoryev · May 12, 2015 at 04:02 PM
Hi,
Thank you for this finding. Please file a bug report including small repro project that we will be able to repro and fix it.
Thank you in advance.
Answer by seaders · Aug 04, 2015 at 01:15 AM
Any update on this? Not bringing in the assets from the .aar bring concerns that the build process doesn't build with .aar files properly. Is that the case, or is this just a weird bug? Also, any estimation on when this might be fixed?
Your answer
Follow this Question
Related Questions
How to access or reference assets from Unity's Assets folder in Android plugin library? 0 Answers
Any resource for creating jar without extending UnityActivityPlayer? 1 Answer
Now that Unity 4.1.2 broke the Android plugin examples, what do you use to learn them? 1 Answer