Krblshna

Good day, I have a bunch of different spine projects and want to draw them in one draw call. I've tried to search any suggestions on the forum, but didn't find any certain example how exactly to accomplish this.
I found one way myself, that possibly correct, but it looks like crutch for me. I open project, then import another project in first one. Then export as json in unity and get one atlas for both of projects. And I could import as many projects as I'd like and do the same.

But maybe I've missed something and there is more correct way? For example, I saw suggestions to use Spine cli, but it seems too hard without any simple example.
Here is my attempt how to reach the same result as above with cli:
// import first project in new project combine
spine -i ./project_folder1/project1.spine -o ./combined/combine.spine -r
// import second project in new project combine
spine -i ./project_folder2/project2.spine -o ./combined/combine.spine -r
// export combined project
spine -i ./combined/combine.spine -e ./export/
Is that the right way how do it with cli?
Avatar
Krblshna
  • Postovi: 22

Harald

We are sorry for the troubles! It looks like you discovered a bug there, we have created an issue ticket here:
https://github.com/EsotericSoftware/spine-editor/issues/640
Thanks for reporting!
Avatar
Harald

Harri
  • Postovi: 4101

Krblshna

Thanks! But still wonder about was it the right way to reduce draw calls via spine cli? Maybe I should use different cli commands or some another method?
Avatar
Krblshna
  • Postovi: 22

Harald

Another way would be to pre-arrange the attachment images in folders per atlas texture and use the CLI to pack by folder structure. This way you have precise control of which attachment end up on which atlas page texture. You can find some info about that in this forum posting:
Is there any way to reduce drawcalls?
You could then use the same export shell script to copy the images to a temp directory for packing, and then pack the images to one or more atlas textures.
Avatar
Harald

Harri
  • Postovi: 4101


Natrag na Unity