Hello everybody!
How can I export a data from Spine version 3.x to 2.x?
If I downgrade Spine to 2.1, it can not open a model.
Spine Export to 2.x
- Düzenlendi
Projects saved with newer versions of Spine have newer features in the project and so cannot be opened by older Spine versions, which don't know about the newer features. The best you can do is use only basic features in the newer project, export to JSON, and then import the JSON into the older version. However, older versions may have different JSON data formats and so the newer JSON may not be accepted by the old version.
There is a JsonRollback tool (source code) that can convert JSON to older versions, but only for some new -> old conversions (3.8.xx to 3.7.94
and 3.3.xx to 2.1.27
). That may be sufficient to go from 3.8 to 3.7 JSON, then see if you can convert that to 2.1.27.
However, using the JsonRollback to modify JSON data to older versions of the JSON format is not a good workflow and we suggest avoiding it if possible. For example, it would be much better to use the latest runtimes, or to open an old version of your project, or to otherwise use the old version to author content that needs to be exported for that old version.
Can you explain your use case? 2.1 is very old (5+ years!).
I use Defold game engine. There is a follow text in a Defold documentation:
«The Spine runtime implementation in Defold supports all Spine 2.x features. The runtime provides only limited additional support for Spine 3.x features. Make sure to use only Spine 2.x features to ensure compatibility with the Defold runtime!»
However I tried to load a Spine model version "3.8.76" into my sample project and everything is well. All animations work correctly.
Great, I'm glad that works, though you should be wary of using features that are different or nonexistent in 2.x. You may have problems with skins, in which case the JsonRollback tool may still help.
Hopefully Defold updates to the latest runtimes at some point. I noticed they have doing that on their roadmap!
I'm also using Defold and looking to use Spine (currently playing with the trial), but I see the current version is 3.x (with 4.x on the way) and I'm a bit concerned that I won't be able to export to a Spine 2.x feature set which is the only option currently available to Defold. I noticed there is an official Corona Lua runtime available, but I assume that one isn't compatible with Defold?
Yep, newer versions of Spine don't export for older runtimes. To use Defold's 2.x support you should use the matching 2.x version of Spine.
Defold seems to have implemented their own runtime for Spine data. Likely they don't support newer versions of Spine data because the new features are more complex and it's a lot of work. Ideally Defold makes use of our runtimes so they can stay up to date.
The Lua runtime is game toolkit agnostic
everything needed to load and display Spine animations, except no rendering. A rendering layer could be built on top of spine-lue to support rendering in Defold, though it may be more efficient to use spine-cpp.