- Uređeno
Hi folks.
I'm working on Spine integration with 2d toolkit. I've started simple and just replaced built-in atlas to tk2d one. So it's pretty close to current Unity runtime (in fact, I took code from it). You can find the package it in the attachments.
Warning: I tested only in Unity 4 so there might be some problems in Unity 3.x
Warning: You must have 2d toolkit in order to use that package
b Warning:[/b] You must have Spine-C# runtime in order to use that package
Also, there are two bugs: one in C#-runtime and another one in Unity-runtime. Both related to rotated sprites.
1) In RegionAttachment.cs, lines 70-73 (where 'region.rotate' check is placed)
If you're using rotated attachments then you got wrong polygon size. I guess that's because of typo with 'height and width' in that check. So I fixed that and it's working! Not sure I properly fixed it. You can see that file in the attachments.
2) In SkeletonComponent.cs, lines 130-133 (setting uv's for rotated polys)
Rotating polys got incorrect uv's. You just want to swap uv's between two vertices, other should look the same. You can find that fix in my Spine-tk2d package in tk2dSpineSkeleton component.
I hope this will help. Thank you for such great framework. Looking forward to make it better!