• RuntimesUnityBugs
  • Apply Regions as Texture Sprite Slices - Not Slicing Texture

I am having a strange issue with the Spine Unity Runtime (4.1) where after the atlas and texture are imported into Unity. Clicking the "Apply Regions as Texture Sprite Slices" does not apply any slices to the texture.

Strangely, I was able to get it to slice once, but now it does not slice at all. It highlights the sprite in unity as if it was updated, but there are no slices.

Anything specific I am missing or could be missing?

Related Discussions
...
  • Изменено

Solved:

Somehow spine exported the atlas file as file_name.atlas.atlas.txt instead of just file_name.atlas.txt after changing the pack setting on export to .atlas.txt

When importing the files into Unity, no errors, but if the atlas text file is .atlas.atlas.txt it will NOT generate the slices on the png texture sheet. I manually renamed the extension and re-imported and it works fine.

Edit: in addition the png should also have .atlas removed from the file name and also in the top of the atlas txt file.

We're sorry for the troubles! Glad to hear you've figured it out, thanks for letting us know.

When importing the files into Unity, no errors, but if the atlas text file is .atlas.atlas.txt it will NOT generate the slices on the png texture sheet. I manually renamed the extension and re-imported and it works fine.

Edit: in addition the png should also have .atlas removed from the file name and also in the top of the atlas txt file.

Thanks for sharing the details of your issue. This looks as if you have accidentally set the Atlas name to skeleton.atlas instead of skeleton, which adds the configured extension .atlas.txt to it.

We have just pushed a bugfix commit to the 4.1 branch (it will be merged to the 4.2-beta branch soon). This fix will be included in the upcoming spine-unity unitypackages. Thanks for reporting!

  • NapalmDest54 ответили на это сообщение.

    Harald

    Where would the Atlas name be set? In the Spine Editor when exporting as PNG, I see the option for output folder/name. I select an output folder and a name (i.e: skeleton), but in the main export window, it auto adds .atlas to the end (i.e. skeleton.atlas). I am unable to remove .atlas from the end, it re-adds it automatically.

    This is the case when running Texture Packer manually:
    http://esotericsoftware.com/spine-texture-packer#Running-the-texture-packer-separately
    If you pack the atlas during skeleton export, it will use the skeleton's name.

    If you export it as PNG image sequence, then it will be the Output file property which is used. You can either omit the extension and specify your/output/dir/name to have the extension automatically appended, or set it explicitly as your/output/dir/name.atlas.txt. If however you set it to your/output/dir/name.atlas but have the extension set to .atlas.txt, it will append the extension to it since it's not already found in the name, leading to .atlas.atlas.txt.