kodoly Since your question was about the attachment API, I only answered about how to set attachments, but it seems to me that for what you want to do, you should still use skins as SilverStraw and Mario answered at the beginning.
Unfortunately, spine-ue4 does not provide a method to repack texture atlas pages at runtime, but it is possible to set multiple skins at once using SetSkins
which is provided by the skeleton component:
https://github.com/EsotericSoftware/spine-runtimes/blob/64853b73bcbce53a1851b2b3b05ba8f5ab37e6d8/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp#L46C7-L46C7
To set multiple skins on your skeleton, create a string type array with the names of the skins you want to combine and then pass it to SetSkins
.
The latest example project contains 09-skins
, which is a level that demonstrates how to set multiple skins on a skeleton.
By the way, if you want to continue asking questions about spine-ue4, you should start a new thread, since this thread was originally for a question about spine-godot.