Related Discussions
...

The two kingdoms have been united.

All hail the great uniter!

5 days later

I'm trying to switch my project over to spine-unity and I got an error:

Assets/Spine/spine-unity/SpriteAttacher.cs(143,131): error CS1061: Type `UnityEngine.Sprite' does not contain a definition for `pixelsPerUnit' and no extension method `pixelsPerUnit' of type `UnityEngine.Sprite' could be found (are you missing a using directive or an assembly reference?)

I'm using Unity 4.5.0f6, do I need to update? It's also possible I messed something else up somehow, it occurred to me I've actually never updated the Spine runtime from the very first time I started using it nearly two years ago. :x

Any particular reason you're sticking with 4.5? 4.6 is okay. 5 is great.

Though I think this error worth looking into too. I think Mitch implemented and checked SpriteAttacher in 4.6.

Nah, no real reason. Just wanted to avoid any issues it might cause, but we need to update Spine so guess we gotta take the plunge. I'll try now and see if the error goes away.


Well... the error's gone, but looks like I have to redo all of the SkeletonData files and the mix data and everything... 🙁 Is there any way to, well, not have to do that? I have backups to start over if necessary.

Is there any more graceful way of updating than deleting the old spine-tk2d files and importing the new package, which causes all Spine references in prefabs to be missing too?

For the component references, what you could have done is use Finder/Explorer: delete all the .cs files but keep all the .meta files where they were (most important is SkeletonAnimation, which is probably the component you have most of on your GameObjects), then copy over the missing .meta files making sure not to replace any existing ones. The .meta files are what Unity uses to find MonoBehaviours (and assets).

The SkeletonData mix data might have just been because you were using a 2-year-old runtime. The new auto-importer may have done some weird stuff to your folders and files though if you're noticing new files everywhere.

Anyway, good questions. Let's wait for Mitch to see if he has advice.

I have no idea what a 2 year old spine runtime looks like lol. Before my time.

Ha, thanks anyway Mitch. 😛

I'll try your method tomorrow Pharan, thanks! I'll probably just have to redo all the mix data but it's not a huge deal.