We want to switch our Skeleton's weapon at runtime but couldn't figure out the right way to do it.
The problem is this weapon image is generated on the fly via an image generator so (if I understand correctly) it can't be put as an attachment in the slot where the weapon would otherwise be in the Spine project. I saw in the Spine tutorials with the goblin they change from a staff to a dagger by switching the attachment ( Perhaps I can still do this with the image even if the image/attachment is not included in the original Spine file? I saw this tutorial from a while ago:
In addition, each user in our game has a unique random generated weapon image for that specific character (it's a turn based strategy game so they are like Fire Emblem units). We would store the generated .atlas.txt
, .json
, and .png
and at runtime I was able to assemble this into a SkeletonDataAsset + SkeletonDataAtlasAsset and have it work correctly, but the final step is making the Spine export process after generating the image of the weapon, which I am working on now.