• Runtimes
  • [2DToolkit] TK2D PNG Atlases + Spine

The latest version of 2DToolkit (2.3) has a feature that is fairly critical for us known as "PNG Atlases". In the Sprite Collection Editor, you can now set the "Atlas Format" to either "PNG" or "Unity Texture." The new "PNG" option results in texture atlases being stored as TextAsset data files that are loaded into Texture2D objects at runtime. This prevents against the massive package size bloat that results from Unity's normal treatment of imported PNG textures, which is to decompress them before packaging them up.

For a game like ours, which is very content-heavy, we have to use the PNG Atlas approach, since Unity (unfortunately) doesn't solve this problem natively.

Long story short - PNG Atlases and Spine don't work together. If I compile a sprite collection with PNG Atlas turned on, I get a bunch of gray boxes where my Spine skeleton parts should be (see attached). Looking at the Inspector, it seems like the material fails to reference the right texture... and I'm not familiar enough with how either Spine or tk2d work to get these stars properly aligned.

Any chance of having this looked at by Spine folks?

Thanks!
David

Related Discussions
...
6 dias depois

Any official word from Spine folks on this or are we going to have to tackle it ourselves?

Thanks,
David

I'll see if I can nudge Nate to reply today. We've been busy with the new launcher so forum replies have been a bit neglected, sorry about that. Afraid I don't know if it's something Nate will be able to help you with.

Sorry for the delay. I'm almost caught up with my forum duties. 🙁

If you change this line:
https://github.com/EsotericSoftware/spi ... er.cs#L105
To use "materialInst" instead of "material" then it works with a TK2D PNG atlas. However, then it no longer works with a Unity atlas. I'm not sure what the ramifications are, but there you go. Would be a good question for Unikron. 🙂

Oh awesome, love a good one-line fix... and we don't use Unity atlases, so I think we're probably good to go! Thanks, Nate!