midiphony-panda написав 1. Does spine-unity provides any specific tool for handling Addressables ? It doesn't feel necessary but I'm curious to know if I missed something.
No, spine-unity currently does not yet offer special tools for handling Addressables. While we are planning to support automatic on-demand dynamic loading atlas assets (see this issue ticket), I'm not sure this would fit your use case.
There are many ways however how Addressables could be used with the spine-unity runtime. E.g. by writing your own Editor or runtime scripts that (potentially first remove and then) swap-out your the desired asset references to the one loaded via your desired workflow, be it Addressables, asset bundles, or the like.
midiphony-panda написав2. Is it okay/preferred to have one SkeletonDataAsset per atlas resolution ? This way, I could have a character_skeleton_data_SD and character_skeleton_data_HD, in order to build/query the correct SkeletonDataAsset depending on the platform.
This is perfectly fine, yes. After swapping out any of these asset references just be sure to re-initialize the SkeletonAnimation
component once by calling skeletonAnimation.Initialize(true);
.
midiphony-panda написав3. Is it okay/preferred to modify a SkeletonDataAsset at runtime to patch/edit the actual atlas asset(s) being used ? This way, I could have one character_skeleton_data, with an empty atlas, and set the atlas I need/want at runtime : it doesn't feel user-friendly from Unity editor though.
This is also fine. Just again be sure to initialize the SkeletonAnimation
component after hooking up your references as described in point (2) above. You would want to do some editor scripting here to automatically setup your SD/HD Adressable references from the original atlas for runtime use, so that everything is prepared when you build your executables. Then a runtime script could look up, load and assign the respective Adressable assets and then call
[Edit: Clear()
was missing] skeletonDataAsset.Clear();
and skeletonAnimation.Initialize(true)
once everything is hooked up.
midiphony-panda написавAside from these questions, feel free to suggest any recommended workflow for this use case ^^
You could theoretically also customize the spine-unity runtime to your requirements, or write your own SpineAtlasAsset
subclass and use it for deferred loading, and the like. Mostly mentioning this for sake of completeness. We would not recommend this unless you feel most comfortable doing it from a programming perspective.