Hi there,
I'm confused here, after having spent about a full hour looking into the forum and the Unity Runtimes documentation and API Guide. So I'm starting to think this isn't even possible. :rolleyes:
My ultimate goal is something that "should" be simple enough: changing the texture resolution of the characters dinamically, as they become smaller in scale (the farthest they are from the orthographic camera). I want to do this to minimize VRAM usage for the multiple NPCs I plan on having on the background.
So, I've exported from Spine to 1.0 and 0.5 scales, and assigned both Atlas Assets on the appropriate field on its Skeleton Data Asset:
But now... how do I switch the active Atlas Asset (the one with index 0, I presume?) of an already instanced Skeleton is using? Of course without affecting the rest of the characters using the same SkeletonDataAsset.
The closest I've been is with this method...
skeleton.SkeletonDataAsset.atlasAssets.SetValue(spineAtlasAsset,0);
...but it changes the SkeletonDataAsset directly as an asset file, not the individual instance.
I'm not a programmer by trade, so I can only modify code of others to some extent, but this surpasses my sphere of knowledge.
Nate describes exactly what I'm trying to achieve in this post...: Multiple atlas sizes with different attachment sets
However, if you don't actually want to show your skeleton larger, you just want to use higher resolution textures so an animation which scales up the skeleton doesn't look bad, then you don't need to use SkeletonJson scale
just load the same skeleton with the larger atlas. The skeleton will render at the same size, but the images it uses will be higher resolution so they won't look bad zoomed in.
However, it's a description only, not a procedure I could follow.
If there is a way to do this, please explain as if I was a dumb keyboard smasher monkey... because I am! :p
EDIT: I've just updated Spine Runtimes to the latest version for my 3.8.99 Spine export, because I needed Blend Mode Materials support. Just so you know, as that screen cap comes from the previous one (one year old).