• Unity
  • Upgrade from 3.8-2019-10-14 to 3.8-2021-07-12 Errors

Hello!

I'm doing a Unity runtime update from spine-unity-3.8-2019-10-14 to spine-unity-3.8-2021-07-12, but when I finished, if I run the game or just click on a SkeletonData asset in the Project view, it's saying the skel has to be re-exported with a newer version of Spine, even though both runtimes say "This Spine-Unity runtime works with data exported from Spine Editor version: 3.8.xx".

Any ideas? Is this by chance a known issue? I realize I'm jumping a big time gap here, but since they're both supposed to be compatible with 3.8.xx I thought I'd be ok.

If it helps, here's the full error printout (note that this error is for asset "WaterRipple_SkeletonData", but the same error is happening on all of our skels):

Error reading skeleton JSON file for SkeletonData asset: WaterRipple_SkeletonData
Unsupported skeleton data, please export with a newer version of Spine.
at Spine.SkeletonJson.ReadSkeletonData (System.IO.TextReader reader) [0x000b2] in C:\Users\Chris\Documents_MoonlightKids\the-wild-at-heart\Assets\Spine\Runtime\spine-csharp\SkeletonJson.cs:103
at Spine.Unity.SkeletonDataAsset.ReadSkeletonData (System.String text, Spine.AttachmentLoader attachmentLoader, System.Single scale) [0x00017] in C:\Users\Chris\Documents_MoonlightKids\the-wild-at-heart\Assets\Spine\Runtime\spine-unity\Asset Types\SkeletonDataAsset.cs:258
at Spine.Unity.SkeletonDataAsset.GetSkeletonData (System.Boolean quiet) [0x000c4] in C:\Users\Chris\Documents_MoonlightKids\the-wild-at-heart\Assets\Spine\Runtime\spine-unity\Asset Types\SkeletonDataAsset.cs:173
UnityEngine.Debug:LogError(Object, Object)
Spine.Unity.SkeletonDataAsset:GetSkeletonData(Boolean) (at Assets/Spine/Runtime/spine-unity/Asset Types/SkeletonDataAsset.cs:176)
Spine.Unity.Editor.SkeletonDataAssetInspector:InitializeEditor() (at Assets/Spine/Editor/spine-unity/Editor/Asset Types/SkeletonDataAssetInspector.cs:147)
Spine.Unity.Editor.SkeletonDataAssetInspector😮nEnable() (at Assets/Spine/Editor/spine-unity/Editor/Asset Types/SkeletonDataAssetInspector.cs:84)

Sorry for the troubles. It seems as if you have been using Spine version 3.8.75, which has some known problems. So unfortunately I have to say that it indeed needs to be exported with a different (newer or older) Spine version.

Ah dang, that's a bummer! Let me ask you this then - the reason we want to update is to try to benefit from any performance / optimization improvements that have been done in the meantime. In your opinion, do you think there were significant enough changes in that area to warrant us doing a full re-export on every Spine skel (140) in our already-released game (https://www.moonlightkids.co/the-wild-at-heart)? I know you can't make the decision for us, but if you were just to give some advice from that angle. We've been dealing with a lot of performance issues coming from Spine Updates as we port to Switch.

I'll let Harald speak to performance issues, but we recommend writing scripts to export your Spine projects. Usually this is done as part of a build process and ensures the data used in the build is the latest data from the projects. It also means it's easy to update to the latest version of Spine.

csumsky3 escribió

In your opinion, do you think there were significant enough changes in that area to warrant us doing a full re-export on every Spine skel (140) in our already-released game

Good question. SkeletonMecanim has received some rather significant performance boost due to some reduced redundancy, I'm pretty certain that the changes happened in this timeframe. Are you using SkeletonAnimation or SkeletonMecanim? I remember your project, but not which component's you were using.

There has been one added feature at all SkeletonRenderer and SkeletonGraphic components, which is the Advanced - Update When Invisible property. This allows you to automatically disable and re-enable some updates when the skeleton is leaving or entering the on-screen area. So you could benefit from this feature if you have many off-screen skeletons active, and are not already disabling them in some way.

Apart from these changes, IIRC SkeletonAnimation should not have seen dramatic changes in performance. Perhaps the quickest way to test if re-exporting all your skeleton assets is worth the update would be to do a quick profiling session with a minimal project and only a single character re-exported. As always, be sure to test on the target device with a release build.

If you decide that it's worth it, I second Nate's advice to automate the export of your assets. If you have a script ready that exports a single asset, you should be able to adjust it to cover even 140 assets in relatively little time.

And once again I have to say that your game is so cute, those little critters are just so lovely! 🙂

Thanks for the reply!

Harald escribió

Are you using SkeletonAnimation or SkeletonMecanim? I remember your project, but not which component's you were using.

We're using SkeletonAnimation yea.

Harald escribió

So you could benefit from this feature if you have many off-screen skeletons active, and are not already disabling them in some way.

I saw that actually! Very exciting for future projects, but in fact we already do our own offscreen disabling in this one.

Harald escribió

Apart from these changes, IIRC SkeletonAnimation should not have seen dramatic changes in performance.

Ok good to know, sounds like it's probably not worth the hassle then. Appreciate the advice.

Harald escribió

I second Nate's advice to automate the export of your assets. If you have a script ready that exports a single asset, you should be able to adjust it to cover even 140 assets in relatively little time.

We don't, no. Not that I know of at least... the only person who's ever inside the Spine application is our animator, and he doesn't really write scripts / do much coding at all. It absolutely sounds like something we should do on future games though. Do you have any documentation or good sources for this?

Harald escribió

And once again I have to say that your game is so cute, those little critters are just so lovely!

Thank you!

csumsky3 escribió

It absolutely sounds like something we should do on future games though. Do you have any documentation or good sources for this?

Quoting myself from the upgrade guide threads:

Harald escribió

If you have many projects, we suggest automating exporting your project files:
Export - Spine User Guide: Command line
For example, here is a script we use to export all the Spine example projects and to create texture atlases:
https://github.com/EsotericSoftware/spine-runtimes/blob/4.0/examples/export/export.sh

This posting by Nate might be interesting as well:
Spine-Unity 3.8 to 4.0 Upgrade Guide
And these threads:
Spine Export Script
Some question about spine command line

Amazing! Thanks again as always, you guys are the best 🙂

8 días más tarde

Thanks for your kind words 🙂.