We want to give tablet users the option of downloading HD assets, as well as optional SD and HD content. I have been reviewing Scripted Importers but can’t see a solution so far. Wondering if somebody can help me out.
How do we create an HD asset and tell unity to use the HD version instead of the SD version included in the app bundle?
More specifically, how can one replace an existing asset with an HD asset downloaded at runtime?
For example, in order to replace the main menu background, the source asset would be:
- SourceAssets/bundles/main_menu/hd/bg.png
The output of the asset pipeline would be: - Assets/Resources/bundles/sd/main_menu/bg.png
- Uploads/bundles/main_menu/hd/bg.png
If the user opts in to HD assets then the main menu prefab shows
- /downloads/bundles/hd/main_menu/bg.png
otherwise they see - Assets/Resources/bundles/sd/main_menu/bg.png
This is an artificial example, but most of the assets are Image and Sprite for UI, characters, levels etc.
We prefer to do this with a custom asset pipeline. We can’t use addressables or unity asset bundles due to the nature of our config pipeline and workflow.