Search code examples
libgdx

TexturePacker2 cuts filenames (not only suffix)


I am using TexturePacker2 to create a TextureAtlas for libGDX. My filenames are put together by a name, a daytime and a x- and y-position.

mytexture_atday_300_400.png

In the myPackage.pack file every TextureRegion occur like this:

mytexture_atday_300

Even if I set the property 'useIndexes' for packing to true... no file suffix and a missing last part of the filename.


Solution

  • TexturePacker always trim the word after the last underscore, then used to be the name of TextureRegion. You should change your filename to use another separator, such as hyphen "-". I think there are no other way.