Hi there -
I currently have a character exported with many different outfits on separate textures. I would like to load the outfit resources only when they are needed, via asset bundles. The bundle organization so far looks like:
Bundle 1: Base Character Resources
Bundle 2: Outfit 1 Resources
...
Bundle N: Outfit X Resources
The loading process has worked well so far, but when instantiating the SkeletonData at runtime, the AtlasAsset logs errors since it can not load all of the materials associated with the Skeleton (even though they are not required for the default skin to animate). Overwriting the MaterialsTextureLoader to continue instead of breaking when finding a null material has seemed to solve the problem, but feels unsafe.
Can you see anything wrong with loading only a partial set of materials in an Atlas Asset at instantiation, while loading and unloading the rest at a further point in runtime? Is there a better way to do or organize this?
Thanks!
After doing a bit more research I've come across a forum post - http://esotericsoftware.com/forum/Override-Material-9200. I see that the "AtlasAsset is designed to be stateless" and "Changes to AtlasAsset after that won't reflect on attachments that were already loaded", so it seems my initial approach at modifying it during runtime would not be a solution. I'll try using CustomMaterialOverride and see if it helps - though the materials I'd like to "override" are originally not loaded. Maybe some stand in materials would do.