nanaxpubli.blogg.se

Texturepacker with skin
Texturepacker with skin













texturepacker with skin
  1. #Texturepacker with skin skin#
  2. #Texturepacker with skin code#

If there is a way to prevent loading the unused skin atlas textures, I could work with this. While that separates the atlases, because the skeleton data references all of the skins, all of the atlases are loaded into memory. I tried using Texture Packer to export one skin atlas per folder. The command line tool appears to automate many steps, except deleting a skin. The artists asked me to fully automate their steps. The artists that I collaborate with want to export one skin so that we do not reserve memory for the unused skins.

texturepacker with skin

If not, how do you recommend that I automate exporting just one skin? Attachments that don't have a region set can't be rendered of course.Would you have time to add a feature to the command-line tool to export just one skin or export one atlas per skin?

texturepacker with skin

You can create your own attachment loader (eg copy/paste AtlasAttachmentLoader, then modify it) and just not set the region if it can't be found in the skin. Spine-runtimes/AtlasAttachmentLoader.java at 3.6

texturepacker with skin

By default, AtlasAttachmentLoader will fail if it can't find a texture region for a region or mesh attachment, eg: Note you will have skeleton data that you haven't loaded images for. At runtime, you would customize loading the texture atlas, skipping loading atlas page images that aren't needed for a particular game state/level/etc.

#Texturepacker with skin code#

At runtime you would have code that choose the right atlas to load.Ģ) If skins are kept in subfolders, you could pack the whole atlas as normal, letting each skin folder get packed to a different atlas page image. Usually skin images are kept in a subfolder containing just the images for that skin, so this may be easy to do. It's possible to break up a skeleton into smaller chunks, but it is likely more work and complication than it is worth.ġ) You could write a script that copies only the images you want to pack to another folder, then pack that folder. While loading ALL images for all attachments can easily be a problem if there are many, having all the skeleton data is likely not a problem (especially with the binary format). I'll assume you don't mind that the skeleton data contains information for all the skins. Though for all this effort, it feels like having an export one skin option would be lower there are a couple ways this could be done. I imagine I could edit the JSON and the atlas to prevent unused skins from being referenced. We use the binary format for speedy loading. I tried exporting JSON, deleting the unused skins in the JSON, then converting to binary, but my in my naive attempt, the binary conversion posted warnings about missing images. Would you have time to add a feature to the command-line tool to export just one skin or export one atlas per skin?















Texturepacker with skin