- Home /
How to insert assets after build?
I want to create a customizable Unity app. I am trying to achieve the following workflow:
Create a Unity app for Android that supports a variable number of customizable and optional assets
Pre-build the app once
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
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 AP$$anonymous$$. Why do the assets need to be packed? Can they not simply be placed in a publicly-accessible directory and accessed via Application.persistentDataPath?
$$anonymous$$y end users will be companies that will pack, sign and publish on Play Store the final app after customization (company logos, images, etc.).
its not unusual. tech artists/devs do this so the production artists can instantly see their updates in game and to import non-standards things, like camera data, in json.
Answer by crogers · Jul 04, 2016 at 06:31 PM
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
$$anonymous$$any 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.
Your answer
![](https://koobas.hobune.stream/wayback/20220612084221im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Having issue building apk 1 Answer
How to post process Unity-built dll before il2cpp kicks in? 1 Answer
I have a problem with my sdk version. Please help me 0 Answers
Audio Gets Distorted in Android Build 0 Answers