How to insert assets after build?

I want to create a customizable Unity app. I am trying to achieve the following workflow:

  1. Create a Unity app for Android that supports a variable number of customizable and optional assets
  2. Pre-build the app once
  3. Users insert in the app their own list of assets (such as logo, images, etc) and a file describing the assets in a JSON or XML file without needing Unity
  4. At runtime, the app finds the JSON file, load the custom assets and use them.

Step 3 should be done by users that do not know how to use Unity (and do not own it). This step requires to unpack the apk, insert the assets and repack the apk. This should be achieved with a simple script.

Questions:

  • What is the best way to achieve this workflow?
  • Do you know a sample project using this approach?

Thanks!

This is a fairly unusual use case - typical end users would not be capable of unpacking and repacking an APK. Why do the assets need to be packed? Can they not simply be placed in a publicly-accessible directory and accessed via Application.persistentDataPath?

1 Answer

1

Asset bundles are the “correct” way to do this.
You can import textures over www.
It’s easy to create a mesh procedurally.
I’ve imported/exported camera data and animation curves with json/xml
materials and shaders can be made on the fly.
unity encrypts your assets, so you would have to protect these yourself if that’s an issue

Many thanks for your reply but I don't think it answers my question. As explained, I want to be able to add assets after the build and without needing Unity. Asset bundles need to be created in Unity unless I have missed something. Using WWW.texture/WWW.text is probably closer to what I am trying to do. But, I do not know how to pack additional images in the .apk and access them by using for instance WWW.