csumsky3

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:OnEnable() (at Assets/Spine/Editor/spine-unity/Editor/Asset Types/SkeletonDataAssetInspector.cs:84)
Avatar
csumsky3
  • Postovi: 29

Harald

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.
Avatar
Harald

Harri
  • Postovi: 3907

csumsky3

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.
Avatar
csumsky3
  • Postovi: 29

Nate

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.
Avatar
Nate

Nate
  • Postovi: 11782

Harald

csumsky3 je napisao/la: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! :)
Avatar
Harald

Harri
  • Postovi: 3907

csumsky3

Thanks for the reply!
Harald je napisao/la:Are you using SkeletonAnimation or SkeletonMecanim? I remember your project, but not which component's you were using.
We're using SkeletonAnimation yea.
Harald je napisao/la: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 je napisao/la: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 je napisao/la: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 je napisao/la:And once again I have to say that your game is so cute, those little critters are just so lovely!
Thank you!
Avatar
csumsky3
  • Postovi: 29

Harald

csumsky3 je napisao/la: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 je napisao/la: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
Avatar
Harald

Harri
  • Postovi: 3907

csumsky3

Amazing! Thanks again as always, you guys are the best :)
Avatar
csumsky3
  • Postovi: 29

Harald

Thanks for your kind words :).
Avatar
Harald

Harri
  • Postovi: 3907


Natrag na Unity