• Editor
  • "packTarget": "perskeleton"

  • Змінено
Related Discussions
...

Hey Nate,

Does "packTarget": "perskeleton" and "packTarget": "single" work?

I noticed there is no way to set it to "single" and also our command line export stopped work.

Has anything changed?


Ok found it. In case there is only one skeleton and "packTarget": "single" then Harald packs ( creates ) atlas with the name of the skeleton instead of the file. Which is inconsistent behaviour.

I don't think anything regarding that has changed recently. When there is only one skeleton, you can't choose per skeleton or single atlas.

If you have a project that doesn't work, we can take a look. Sorry for the trouble if there is something that broke!


Harald does the packing? 😃 We shall have him whipped for not doing it as you like!

If there is only one skeleton, it is always "single". When packing an atlas for a single skeleton, the name of the skeleton is used. This makes sense, because the atlas is for that specific skeleton.

When packing images for multiple skeletons into a single atlas, it wouldn't make sense to name the atlas for one of the skeletons. In that case, Spine (not Harald :p) uses the project file name.

For more control you can run the texture packer separately, rather than as part of data export. Then you can specify the atlas name explicitly.

BTW, we've updated our documentation recently and it's much improved:
Command line interface - Spine User Guide
Export - Spine User Guide

Yes and that is the issue. Why would you use the name of the skeleton if there is only one? What if we add the other one later, as we do it. May I ask for consistent naming. In case of single use the project name no matter how many skeletons are in the project? And whip Harald for not serving your best customer well. :-) :-) :-)

foriero написав

Why would you use the name of the skeleton if there is only one?

As I said, because the atlas is for a specific skeleton. Normally you cannot choose perskeleton when there is one skeleton.

foriero написав

May I ask for consistent naming. In case of single use the project name no matter how many skeletons are in the project?

Changing this will be surprising for everyone who expects their atlas to be named after the skeleton.

We have to choose the name for you somehow and there is no right or wrong way of choosing the name. If you want to choose the name, why not run the texture packer separately?

There are many ways to run the texture packer, not just the many settings available and running it as part of data export or separately, but it can also be run via the UI or the CLI. When using the CLI, you can specify perskeleton (by editing the settings file) when there is only a single skeleton, even though the UI does not allow that. If that is what you are doing, then I think it would be fine to use the project file name when there is only one skeleton.

Yes. That is what we are doing. We use CLI, setting it to single and expect spine project atlas name. How can I know ahead what skeleton name is inside?


Then I would nicely ask, if it is not possible from editor UI but it is possible only via CLI, would you be so kind and keep it consistent, which means project name atlas no matter how many skeletons are inside?


And anyway I feel it should be also possible from editor UI.just keep consistent output.

This isn't about inconsistency, it's about providing a reasonable default, which is what we do. I do understand you don't like the default. 🙂

foriero написав

How can I know ahead what skeleton name is inside?

It's your project, so I'd expect you to know the skeleton name. The JSON file is also written using the skeleton name, so it'll be the same as that. The `


info` CLI parameter can tell you about the skeletons in a project.

In 4.0.74-beta:

When perSkeleton texture packing is used with a single skeleton, prefer using the project file name for the atlas name.

If you set it to single, you'll get the current behavior. If you use perSkeleton and have one skeleton, you'll get the project name.

Nate, that is kind of up side down implementation.

"perskeleton" should always as a default produce skeleton's NAME atlases
"single" should always as a default produce project NAME atlas

The reason for it is that in bigger projects you simply add more skeletons on the go, and if perskeleton or single messing things up then also our repositories and unity projects are messed up.

As a bonus allow "single" from Spine Editor ( expect that one can import/add more skeletons in the production project )

If now you have implemented that perSkeleton with one skeleton producing project NAME atlas then it is even bigger mess than before. :-) :-) :-)

Thank you and sorry for the troubles.


Bellow is a result of a spine project that first had only one mushroom and then later we added more mushrooms. The project was exported with "single" and for the first time exported atlas with a skeleton name ( there was only one skeleton ) then it exported with project name. Then I have to manually fix it in Unity, and have to manually fix it in repository.

I would really like to ask for consistency. Why would you default "single" export into "perskeleton" ouput?


Hey Nate, the following feels contradictory, illogical, and kind of up side down:

When "perSkeleton" texture packing is used with a single skeleton, prefer using the project file name for the atlas name.

It should state:

When "single" texture packing is used with a single skeleton, prefer using the project file name for the atlas name.

Thanks for the clarification. There may be something that we can do to improve this. Unfortunately I will be traveling for a few days, but I won't forget and we'll review it when possible.

For now I can say that it's always been that the atlas is named using the skeleton name. Changing that will likely break many users and so doesn't seem like a good idea. Later we added "per skeleton" and of course using the skeleton name doesn't make sense then, so we had to do something else.

I don't think it will break anything, since nobody except us ( hopefully ) used it via command line, and since you don't allow to export "single" with single skeleton inside the project then I don't think anything will break. May be very few cases.

Anyway I just double-checked how it works in editor and the behaviour is super odd.

I have three skeletons, then go export and set it to "single", and export it.

Then I delete two skeletons, then go export and "single" disappeared, and export producing skeleton name atlas, which messes the unity and repository. This is really a "poor" design. :-)

We've reviewed the behavior and made the following changes:

  • When packing to a single atlas as part of data export, use the project name even if there is only one skeleton.
  • Allow choosing atlas per skeleton or a single atlas when there is one skeleton.

I believe this achieves what you want and I agree it makes more sense. Cheers!

Thank you very much. :-)