• EditorBugs
  • 4.3-Beta Exported JSON Won't Import in Unity

Sort of. Development is active during beta and the export from 4.3 to 4.2 doesn't yet have the conversions for the "target" naming. We'll get that done in 4.3.14-beta today.

Other than that, exporting to an old version is meant only for emergency recovery purposes and isn't a recommended workflow -- there may be data loss. For example, transform constraints in 4.3 have more features (eg mapping rotation to translation) and that can't be fully exported back to 4.2, which lacks those features. In 4.3.14-beta we'll try to keep transform constraints that have "straight across" mappings (eg rotation to rotation) but other mappings would be lost.

When exporting JSON to an older version, you'll not want to use the JSON directly in a runtime. Instead you'd import it into an older version of Spine, so you have a project file that matches your runtime version, and then continue working on it in the older Spine version.

Related Discussions
...

Got it. Thanks for the additional info and intended use for the version export setting!

Guess I've gotta wait for the 4.3.14-beta update later today 😅

As of this moment, the emergency export to previous editor versions is broken. I thankfully don't use anything that would be lost in the transfer, but I look forward to this being fixed so I can recover some work from when I was testing 4.3. I've been manually editing the json files this afternoon, which is easy, just time-consuming. 🙂

I understand. We're working on the conversion and will have it done today. The hard part is converting transform constraints back to 4.2 where possible. I feel bad that I've caused you this trouble by not warning about fully switching to the beta. 🤕

No need to feel bad. It was our fault for not fully realizing the ramifications of updating to a beta version, and our incorrect assumption that the Runtime beta is released in parity with the Editor beta lol

Yes, PLEASE do not think we're displeased. If anything, we are impressed and grateful as to the speed of your responses. Don't miss dinner for our sake. We have time.

In fact, I've already text-edited myself out of danger. 🙂

I don't know what that is exactly, but it's cool! 😎

I'm glad you aren't blocked anymore at least. I guess you don't have transform constraints, else it would have been a bit tricky to convert with a text editor.

4.3.13-beta is up now! It converts path slot->target, transform constraint source->target, and the new transform constraint properties to the old offsets, as much as is possible.

@ExNull-Tyelor @FCSW_Ben FYI, the spine-unity runtime on the 4.3-beta branch has been updated to load 4.3 skeletons from the most recent Spine Editor now. The previous spine-unity 4.3-beta state reading skeletons of version 4.2 was just mirroring the state of the 4.2 branch, without any 4.3-beta changes included yet.

The first 4.3-beta spine-unity packages are available for download here as usual:
https://esotericsoftware.com/spine-unity-download
Please note that as always, any beta (especially when early in development) is not recommended for production use.

We are currently investigating an issue with negative skeleton scale and Transform Constraint changing behaviour compared to 4.2, so you might want to wait a bit before upgrading your existing projects.

    Harald

    I'm kinda sad that I haven't checkout the forum BEFORE updating all my project to the lastest beta version, but I couldn't wait to try your amazing new addition ! It's my fault anyways, it's a beta.

    Anyways, I didn't actually changed anything on my constraint right now, I could have skipped the beta honestly. (I mean on this project, I tested it on another scene and didn't changed back to 4.2)
    I did it anyway, but now the import in bytes doesn't work for me :

    IndexOutOfRangeException: Index was outside the bounds of the array.
    Spine.SkeletonBinary.ReadSkeletonData (System.IO.Stream file) (at Assets/Plugins/Spine/Runtime/spine-csharp/SkeletonBinary.cs:326)
    Spine.Unity.Editor.AssetUtility.AddRequiredAtlasRegionsFromBinary (System.String skeletonDataPath, System.Collections.Generic.List1[T] requiredPaths) (at Assets/Plugins/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs:224)
    Spine.Unity.Editor.AssetUtility.GetRequiredAtlasRegions (System.String skeletonDataPath) (at Assets/Plugins/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs:141)
    Spine.Unity.Editor.AssetUtility.ImportSpineContent (System.String[] imported, System.Collections.Generic.List
    1[T] texturesWithoutMetaFile, System.Boolean reimport) (at Assets/Plugins/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs:438)
    Spine.Unity.Editor.SkeletonDataAssetInspector.DoReimport () (at Assets/Plugins/Spine/Editor/spine-unity/Editor/Asset Types/SkeletonDataAssetInspector.cs:698)
    Spine.Unity.Editor.SkeletonDataAssetInspector.OnInspectorGUI () (at Assets/Plugins/Spine/Editor/spine-unity/Editor/Asset Types/SkeletonDataAssetInspector.cs:240)
    UnityEditor.UIElements.InspectorElement+<>cDisplayClass79_0.<CreateInspectorElementUsingIMGUI>b0 () (at <eebf6a509b354512a5d405c8a7dd6f88>:0)
    UnityEngine.GUIUtility😛rocessEvent(Int32, IntPtr, Boolean&)

    The JSON import work fine, so it's fine for me, at least until you solve the problem. I haven't done all my project but I hope it will work on others too.
    I can give you the project, the byte and the JSON if wanted, if it can help you.

    Anyways, the things you added in 4.3 is amazing ! The keysheet, constraint... amazing work. 💯

    @Pentacles Sorry to hear you're having troubles. Please note that the latest 4.3.14-beta version update is less than a day old and contained breaking format changes. Binary exports are always more brittle in this regard than JSON for obvious reasons. The spine-unity runtime has just been updated to reflect the runtime changes accordingly, please give it a try.

    A new spine-unity 4.3-beta unitypackage is available for download here as usual:
    https://esotericsoftware.com/spine-unity-download
    If you are still encountering issues after that, please do let us know.

      We are currently investigating an issue with negative skeleton scale and Transform Constraint changing behaviour compared to 4.2, so you might want to wait a bit before upgrading your existing projects.

      FYI: This issue has been fixed in the latest 4.3.14-beta release and the above spine-unity 4.3 runtime package.

      Harald
      Oh, sorry if that wasn't clear, this is clearly my fault, not yours.
      It's Spine beta 4.3 for a reason, using it on project is risky, and I shouldn't have taken the risk to break everything, just to try everything you've added, like a toddler with a new toy 🤣

      I'll wait the official release for updating all my projects to it, but I'll check it out for the newest project !
      I'll get back to you when I'll be on it, if I ever get trouble with it

        Pentacles It's Spine beta 4.3 for a reason, using it on project is risky, and I shouldn't have taken the risk to break everything, just to try everything you've added, like a toddler with a new toy 🤣

        That's a funny analogy.😁Hope that doesn't make us bad parents if we hand out dangerous toys without restrictions. 😉

        Pentacles I'll wait the official release for updating all my projects to it, but I'll check it out for the newest project !

        That's very reasonable. Also be sure to keep a copy of your original (4.2) projects around, so you don't lose anything upon upgrading to a new (beta) version in case anything is temporarily broken. I'm sure you do that already, just mentioning in case it helps others.