Not yet, we did consider it for 3.8 but it didn't quite make it!
Spine 3.8 released - mesh tracing, polygon packing, and more
Hi,
Can you help me? I have 3 spines of version "3.8.59", 3 spines "3.8.6" and one spine "3.7.94".
Besides, I have the latest version of unity3d plugin, and when I import them, 3 spines of version "3.8.59" has the same error
InvalidCastException: Cannot cast from source type to destination type.
Spine.Unity.Editor.AssetUtility.GetRequiredAtlasRegions (System.String skeletonDataPath) (at Assets/Utils/SpinePlugin/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs:128)
Spine.Unity.Editor.AssetUtility.ImportSpineContent (System.String[] imported, Boolean reimport) (at Assets/Utils/SpinePlugin/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs:304)
Spine.Unity.Editor.AssetUtility.HandleOnPostprocessAllAssets (System.String[] imported) (at Assets/Utils/SpinePlugin/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs:91)
Spine.Unity.Editor.SpineEditorUtilities.OnPostprocessAllAssets (System.String[] imported, System.String[] deleted, System.String[] moved, System.String[] movedFromAssetPaths) (at Assets/Utils/SpinePlugin/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs:74)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at C:/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:141)
UnityEditorInternal.InternalEditorUtilityrojectWindowDrag(HierarchyProperty, Boolean)
UnityEngine.GUIUtilityrocessEvent(Int32, IntPtr)
But, other animations imported without errors.
Nate लिखाNot yet, we did consider it for 3.8 but it didn't quite make it!
Thank you, hopefully for next release
Fabiano il Flaco लिखाI hope that, if you're ever going to change the logo, you're going to change its font
That's exactly what the new logo was for. The video must have gotten public before the title was changed!
great update!
It will be great to have some tool to migrate json 3.6 to latest json 3.8 ... is it possible somehow? It's too hard to reexport whole 500 files to latest version. Any solution to simplify life?
I would love to use the new updated version 3.8, but I would have to re export every animation I have, since we keep updating our games online, again. we are talking years of work, on countless projects, with settings I no longer remember. since all our games are updated at the same time, we would have to upgrade to newest version, then in a mad panic try to find, and re export all of 3 years of animations again. is there another way, please?
it is becoming a problem, and that problem will only grow.
also, what happens the next time you decide to do an update that doesn't support older version of exports, and we are 5, 7 or 9 years in? will you just as calmly ask us to export everything again?
puzzler लिखाIt will be great to have some tool to migrate json 3.6 to latest json 3.8 ... is it possible somehow? It's too hard to reexport whole 500 files to latest version. Any solution to simplify life?
You can do all your exports from the command line:
Export - Spine User Guide: Command line
It's not hard to write a script that exports all your project files in one go. Please create a new topic if you'd like assistance with this.
steffan.weber लिखाI would love to use the new updated version 3.8, but I would have to re export every animation I have, since we keep updating our games online, again. we are talking years of work, on countless projects, with settings I no longer remember. since all our games are updated at the same time, we would have to upgrade to newest version, then in a mad panic try to find, and re export all of 3 years of animations again. is there another way, please?
Sorry, there isn't another way. The JSON data is intended for use at runtime, not for long term storage.
It should not be a terribly difficult problem since there are very few settings for exporting JSON/binary, which is all you need to re-export. You don't need to export your atlases again. However, if you wanted to, for a long time now export settings are stored in the project file, so that is likely easier than you might expect.
steffan.weber लिखाalso, what happens the next time you decide to do an update that doesn't support older version of exports, and we are 5, 7 or 9 years in?
To import data into the editor, you need to use the version of the editor that exported the data. Newer editors do not officially support importing data from older versions, though sometimes that does work coincidentally. You can import the data then save a project file. Once you have a project file, you can open that with any newer version of the editor.
steffan.weber लिखाwill you just as calmly ask us to export everything again?
Whenever you update your runtime version (excluding patch releases, where version numbers are major.minor.patch
), you will need to export your project files to JSON or binary again. This can be automated using the command line interface. You can write a script to re-export all your projects at once. If needed you can even write a script to load an old version of Spine, import old data, save a project file, load that project file in a new version of Spine, and do an export.
Nate, this is insane to re export whole project files to migrate from 6 to 8 ... I know command line tools. It took several years to develop animations, different path, different export names, renames and etc. It's impossible just to use "command line tool". Need a better way to support old formats on SDK side.
What is insane about it? You don't need to export atlases. Exporting JSON or binary has very few settings. If the .spine
file was lost, you can import into the older version, then export with the new version.
It is unreasonable for us to bloat all of the many runtimes so they can load data from any older version. Still, I do agree there is more we can do to make things easier and we have some plans for that soonish. It won't be allowing runtimes to load older data though.
One solution for now may be that you copy SkeletonJson or SkeletonBinary from an old runtime into the latest runtimes and fix up any errors. This would allow you to load the older JSON or binary data, if you really must go that route.
I don't know location for all original Spine files. Also, some of them was changes, adjusted ... a lot of versions, tests, and latest version is not obvious. It's TOO MANY spine files, versions. Also, names of json does not match Spine files or skeletons. It's very hard to redo whole this job again. It's near impossible to use latest version of Spine because of this.
The alternative solution I can think of is - tool to convert json/binary directly (without using original .spine file).
You can always just import the json/binary in Spine, save a new project, upgrade Spine to the latest version and export the project. If you import all the old jsons in a single spine project it's also convenient as you'd export them all at once.
If you exported your files with nonessential data checked you should definitely be good to go but likely that may be also true if you haven't as you already have atlases exported.
Could you please make a sample script of how to convert old version to the latest?
This runs Spine 3.6.53 and imports old.json
(which must be JSON exported from 3.6.53) into the project.spine
project file:
spine -u 3.6.53 -i old.json -o project.spine
You would of course change 3.6.53
to the actual version of the JSON data, which is in the JSON data (unless it is very old data).
You can specify more actions in one run of Spine:
spine -u 3.6.53 -i old1.json -o project1.spine -i old2.json -o project2.spine -i old3.json -o project3.spine
If you are writing a shell script, Windows batch scripts are pretty nasty to deal with. On Windows I prefer to install Cygwin and use a bash script. For example, here is the script we use to export all the example projects:
spine-runtimes/export.sh at 3.8
As seen there, in a bash script you can escape the newline character using blackslash, so the command above can be written a bit more nicely:
spine -u 3.6.53 \
-i old1.json -o project1.spine \
-i old2.json -o project2.spine \
-i old3.json -o project3.spine
There are many ways to write a script that runs a command like this on all files in a folder. If each JSON file can be any version, you could write a little application that reads the version from the JSON to use the correct -u
parameter. If your JSON is so old it doesn't have the Spine version it was exported from, you may need to do some trial and error to see which Spine version it can be imported into.
Please note that if you are moving from < 3.0.00 to >= 3.0.00 that how scale is applied has changed. Such a big change in behavior across versions is very rare and something we try to avoid.
Now that you have project files, you can simply open them with any new version of Spine (eg, the latest). If you want to export the project files to JSON using the command line or a script, that is done like this:
spine -u 3.8.83 -i project.spine -o project.json -e settings.export.json
The settings.export.json
file can be saved from the export dialog in Spine.
The command line interface (CLI) documentation has more detailed information:
Export - Spine User Guide: Command line