• Editor
  • Issue with importing JSON character animation into Cocos Creator

Hi,
I have created a character animation in Spine and exported it in JSON format. However, when I try to import this JSON file into Cocos Creator, it fails to load. Is there a specific export setting or method that I need to follow in order for the animation to work in Cocos Creator? Any assistance or tips would be greatly appreciated.
Spine Version 4.2
Thank you!

Related Discussions
...

When exporting animations from Spine to be used in Cocos Creator, it's crucial to ensure that the Spine runtime version you are using in Cocos Creator matches the version of the Spine editor used to export the JSON file. Since you are using Spine version 4.2, you need to ensure that the Cocos Creator project is using a compatible runtime version. If the runtime version is older, it may not support the JSON format changes introduced in newer Spine versions. Additionally, make sure that all necessary files (such as the .atlas and image files) are correctly linked and that the file extensions are set up properly. If you continue to experience issues, you might want to check if there are any specific settings or updates required for the Cocos Creator runtime to handle the latest Spine export formats.

Hi,

Thank you for the guidance regarding exporting Spine animations to work in Cocos Creator. I wanted to share how I resolved my issue so it may help others facing the same problem.

Problem:
I created a character animation in Spine (v4.2) and exported it in JSON format. However, the JSON file failed to load in Cocos Creator.

Solution Steps:
Spine Runtime Version Compatibility:
Ensure the Spine runtime version used in Cocos Creator matches the Spine editor version. In my case, Cocos Creator didn’t support Spine v4.2 exports directly.

Using Spine v3.8 for Export:

I first imported the animation into Spine version 3.8 (a version compatible with the Cocos Creator runtime).
Then, I exported the animation from Spine v3.8 in JSON format.
Adjusting Mesh Issues:
After importing the Spine animation into Cocos Creator, the animation worked, but the mesh was slightly distorted. I manually fixed the mesh issues within Spine v3.8, and everything worked fine after that.

Outcome: :
This process allowed me to successfully import and use Spine animations in Cocos Creator. If anyone faces similar issues, I hope these steps help!

Thanks again for the support! :