2D Toolkit Forum

2D Toolkit => Support => Topic started by: Krin on June 04, 2013, 05:35:26 am

Title: Using 2DTK with Spine - Need Help
Post by: Krin on June 04, 2013, 05:35:26 am
Hey,

I absolutely love the plug-ins so far, but I need some help with something specific.


However, I do wish to have trimming on, because it saves a great deal of space. My question is - is there a way to reference the Texture's original (frame) width and height before it was trimmed? As well as the offset of the trimmed texture relative to the original? (In order to UV map it properly onto a mesh)

My second question is, is there any way to dynamically generate collections at runtime? Or if there is any similar solution? In that case that I wanted to use the same Spine skeleton for characters, but I want to be able to change their skins?

Thanks!
Title: Re: Using 2DTK with Spine - Need Help
Post by: unikronsoftware on June 04, 2013, 10:57:29 am
1. I think the problem is that Spines runtime doesn't work with trimmed tk2d atlases. It could be modified to work though. Sadly I don't have the time to look into this at the moment, especially since I don't know how Spine works and it would take a while to work it out.

2. Yes, use tk2dSpriteCollectionData.CreateFromTexture to manually specify regions and CreateFromTexturePacker to import Texture Packer atlases.
Title: Re: Using 2DTK with Spine - Need Help
Post by: Krin on June 06, 2013, 11:01:18 am
Alright thanks :)