It depends on how you originally created your Spine skeleton, there it's defined as 1unit = 1px (before any scaling), it does not change if you later modify the texture size of the atlas texture after it has been exported.
Let's assume you originally created your skeleton with attachments of the size that was packed to a 1024x1024 atlas texture after export, with e.g. a head attachment image of the size 100x100 px. When you drag-and-drop your 100x100 image into the Spine Editor viewport to create a bone with an attachment, (and it's a child of the root bone), then the rectangle mesh that holds the head image will be of size 100x100 units in Spine. If you don't scale any of the bones and attachments and export the skeleton normally, you will end up with 1 px being equal to 1 unit, which is saved in the skeleton .json
or .skel.bytes
file. Now you can modify the texture as you like, e.g. open it in an image editor and downscale it to quarter size, this will not modify the skeleton data that is contained in the .json
file, the rectangle mesh of the attachment is still 100x100 units.
In other words, think of it more like a 3D model: you have created the mesh geometry once and mapped a texture to it, now the mesh geometry scale matters, not the resolution of your texture. Note that size can later no longer be derived reasonably from the attachment image size, since you can scale and distort your attachments and bones as you like, or use multiple atlas textures that have been downscaled differently.
Importing in Unity now provides an import skeleton scale factor to scale the 100x100 units rectangle (which were created by a 100x100 pixels image) so that you don't end up with 100 units for the original 100 pixels (scale of 1). If you now want the PPU (pixels per unit) to be 256, you can set the import skeleton scale to 1 / PPU
= 1 / 256
since it's the inverse of PPU, units per pixel. This will make your 100x100 units become 100 / 256
x 100 / 256
units in your Unity scene, which is the same as if you drag & drop a 100x100px image into the Unity scene at 256 PPU.
To answer your question: if you have originally created your skeleton with attachments that led to the 1024x1024 atlas (without any texture scale of e.g. 0.5 upon export), then this skeleton should be imported with import scale 1 / 256
for 256 PPU. If you have a second copy of the skeleton data asset for quarter size with a downscaled texture of 256x256 that uses the same unmodified skeleton .json file (created for the 1024x1024 size), you need to multiply the import scale for that skeleton data asset by a further 1/4 to match the quarter texture size, which will be 1/256/4 = 1/1024
.
If you have just a single SkeletonDataAsset, set the import scale to 1/256 and set the GameObject scale of any instance that uses the 1/4 downscaled texture to scale 1/4.