The problem here is that the skeleton is referencing attachment region names including their image directory path "Base Character/"
while when calling the Texture Packer manually on the subdirectory "Base Character/"
as input directory, this directory counts as the base image directory and so will not be part of any region names, leading to "arm_1"
instead of "Base Character/arm_1"
.
If you want to keep the prefix Base Character/
in your atlas region names (which makes sense), the recommended solution would be to write a simple script to copy your to-be-packed image folders (e.g. "Base Character"
) over to a packing directory which can then serve as the input directory, and then via the Spine Command Line Interface export the packed atlas, using this parent packing directory as the input directory.
Another way would be to export the Skeleton and select Texture Atlas
Pack
Image Folder
, but this will create a single atlas with multiple atlas pages for each image folder, where you might prefer one atlas per folder.
Harald wroteWhen doing a character with Right/Left + Up directions and equipment is it best practice to do a separate skeleton for the up direction?
This is a common solution which has some advantages and drawbacks. Some gameplay framework asset packs on the Asset Store for example are built to switch between separate GameObjects per direction.
On the other hand, having one Spine Skeleton for all directions will allow you to have nicer transition animations from e.g. a walk-up
animation to a walk-right
animation, which would be more complicated to achieve when having to switch to a different enabled Skeleton. It may also make it easier to control animations in general.
Regarding equipping items and different directions, it will not make much of a difference: you would then equip the goldensword-up
attachment at your weapon-up
slot and your goldensword-right
at your weapon-right
slot, while the respectively playing animation will show and hide the respective attachments. You could also see each equipment item as a skin, attaching multiple attachment images at multiple slots, like trousers are also a skin in the Mix and Match
example Spine project. You can check out the code in spine-unity example scene Spine Examples/Other Examples/Mix and Match Skins
.