In our current project, we have multiple separate skeletons that all use identical atlases. (The skeletons are separate to make things easier on the animators.) Having all of these identical atlases (or more specifically, their textures) is a big waste of space in the project; these are enormous 4K textures, and it would be vastly preferable to have only one of each, rather than having so many duplicates.
I have successfully made two spines use the same atlas, and have started writing an editor script to automate the process; however, many many parts of Spine's Unity codebase rely on the idea that atlases (and their textures) will always have an identical filename to the skeleton, and will be found in the same directory as the skeleton. I've been hacking away at the codebase to try and accommodate this new approach, but I'm still hitting unpredictable problems like spines turning invisible when their assets are updated, or references all breaking whenever the editor is closed and then re-opened. I could keep chasing all these weird bugs (this is just the latest wave of them), but I think at this point I should ask whether this is a solved problem already; is there any recommended way for multiple SkeletonData assets to all use a single Atlas, such that nothing involved will break or lose its references when any of the assets involved are updated on disk and trigger a reimport?
Just to follow up
I've started suspecting that I'd have more luck if I exported the skeleton and the atlas from spine as two separate operations, with each one already named the way that I want, rather than awkwardly trying to rename assets in an atlas that was expecting them to be named differently. The issue that I'm running into with that approach is: how do I know which atlas to assign to each skeleton, if I'm trying to do this in an automated way? There seems to be no way to query a .spine file from the CLI, for information like "what folder does this skeleton source its assets from"?