Defold now has TexturePacker support

Nice! I added this video to our list of video tutorials on defold.com/videos:

Also added the video to the Texture Packer documentation:

5 Likes

Do you have to use the “Polygon Outline” trim mode? Defold does not seem to handle the .tpinfo file properly unless is has that selected. But then it seem to maybe have a hard time with using slice 9?

Trimmed

Non Trimmed

Yes, it was an oversight in the initial support.
We have a ticket for this issue here: Add support for non-polygon trim modes · Issue #4 · defold/extension-texturepacker · GitHub

3 Likes

It should be easy to add that data for the exporter by simply exporting a rectangle for the sprites.
However the question is if it would also fix the 9-slice problems.

1 Like

I agree, I just overlooked the issuein my first pass.
If the rectangle is the same size as the actual image, then I think the 9-slice should work as usual.

What about trimming?

We could provide the trimmed rectangles (x=0,y=0,w=trimmed width, h=trimmed height) or the trimmed within the original size (x=offsetX, y=offsetY, w=trimmed width, h=trimmed height)?

Yeah, I believe we still store the original size, so storing the trimmed rectangle should work.