How to change SpineAtlasAsset?
The main goal is changing character skins at runtime. Character has a huge amount of skins props etc. If i'll call simple skin combining like in tutorial i'll still have extra materials and loss memory. I want to have textures separately of my skin and apply or load only needed.
II tryed AtlasRegionAttacher as in example. But there is no animation deformations and coordinates messed.
The best way is CustomMaterialOverride. Its working really faster than MixAndMatch and allows changing textures.
skeletonAnimation.CustomMaterialOverride[param.referenceMaterial] = param.newMaterial;
But you shoud have fixed positions of images in atlas after exporting. Animator said its ipmossible! Spine each time make random positions.
Last chance is changing SpineAtlasAsset. It allows to hold image positions in metadata.
I found method allows change on source skeleton
skeletonAnimation.skeletonDataAsset.atlasAssets[i] = atlasAsset;
How to change it on instance?
Thanks