• Editor
  • Unity - JSON error

Related Discussions
...

Hi guys,

Got another error while importing my SPINE Json\Atlas into UNITY.

I'm not sure if because I didn't update my Unity (I'm afraid of messing up my scripts, so I didn't update)

When I import my SPINE files (installed the newest SPINE runtimes) I get JSON errors when trying to
"create" ~> "SPINE skeletonData"

Here is what I'm getting.
Skeleton JSON file not set for SkeletonData asset: New SkeletonData
UnityEngine.Debug:LogError(Object, Object)
Spine.Unity.SkeletonDataAsset:GetSkeletonData(Boolean) (at Assets/spine-unity/Asset Types/SkeletonDataAsset.cs:74)
Spine.Unity.Editor.SkeletonDataAssetInspector😮nEnable() (at Assets/spine-unity/Asset Types/Editor/SkeletonDataAssetInspector.cs:71)
UnityEditor.AssetDatabase:CreateAsset(Object, String)
Spine.Unity.Editor.Menus:CreateAsset(String) (at Assets/spine-unity/Editor/Menus.cs:57)
Spine.Unity.Editor.Menus:CreateSkeletonData() (at Assets/spine-unity/Editor/Menus.cs:45)

Skeleton JSON file not set for SkeletonData asset: New SkeletonData
UnityEngine.Debug:LogError(Object, Object)
Spine.Unity.SkeletonDataAsset:GetSkeletonData(Boolean) (at Assets/spine-unity/Asset Types/SkeletonDataAsset.cs:74)
Spine.Unity.Editor.SkeletonDataAssetInspector😮nEnable() (at Assets/spine-unity/Asset Types/Editor/SkeletonDataAssetInspector.cs:71)
Spine.Unity.Editor.SkeletonDataAssetInspector😮nInspectorGUI() (at Assets/spine-unity/Asset Types/Editor/SkeletonDataAssetInspector.cs:111)
UnityEditor.DockArea😮nGUI()

For the life of me I can't figure out what to do. I reinstalled the Runtimes a few times now and re-exported the files. One error I received had to do with the "Shear" keyframes. So I removed that.. but now I have this error.

I'll keep plugging away, but if someone has the answer already. Please let me know

[EDIT] It seems really random.. Now it works. But I still get the console errors....

The release version of the unitypackage hasn't been updated to read those. But you can make it read them with spine-csharp 3.2 beta.

Those error logs make no sense. You already have the json assigned.
You can see the code here: https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-unity/Assets/spine-unity/Asset%20Types/SkeletonDataAsset.cs#L72-L77
That the only reason that error would show up is when it sees skeletonJson == null.

Are you sure the logged errors are new and weren't generated before it started working?