Roffy

Hi everyone. I have an issue: Skeleton JSON file not set for SkeletonData asset: testSpine_SkeletonData
But the reference to the skeleton JSON is in its place.
Spine files are correct and perfect work. But on clear project import (after deleting Library folder, for example), I saw this issue, only for prefabs with SkeletonGraphic component.
How i can fix it? Maybe it's unity runtime bug?

Spine: 3.6.53, runtime compatibility: 3.6.xx

Stack:
Skeleton JSON file not set for SkeletonData asset: testSpine_SkeletonData
UnityEngine.Debug:LogError(Object, Object)
Spine.Unity.SkeletonDataAsset:GetSkeletonData(Boolean) (at Assets/Spine/spine-unity/Asset Types/SkeletonDataAsset.cs:96)
Spine.Unity.SkeletonGraphic:Initialize(Boolean) (at Assets/Spine/spine-unity/Modules/SkeletonGraphic/SkeletonGraphic.cs:233)
Spine.Unity.SkeletonGraphic:OnValidate() (at Assets/Spine/spine-unity/Modules/SkeletonGraphic/SkeletonGraphic.cs:105)
Roffy
Posts: 2

Pharan

This sometimes happens on a fresh import or Unity version update. I'm not sure why. It's possible that validation happens before serialization in some situations but I'm not sure how to detect it.

Thanks for reporting though. Is this a problem that is preventing the GameObject from functioning properly when you finally run it in Play mode or in builds?
User avatar
Pharan

Pharan
Posts: 5366

Roffy

Thanks for your answer!
Is this a problem that is preventing the GameObject from functioning properly when you finally run it in Play mode or in builds?
No, i haven't problems on building or in playmod. In my case, it's only problem with first time import, after this, all working fine.
For detecting this situation. I have used crutch: EditorApplication.isUpdating on OnValidate method start. But it is't good way...
Roffy
Posts: 2

Pharan

We'll add this as an issue and address it. Strangely, it doesn't happen every time. Just in certain situations. We may just move some of the logic from OnValidate and put it in some editor-side code.

Thanks again!
User avatar
Pharan

Pharan
Posts: 5366

Harald

This error has finally been fixed.

You can download the latest unitypackage from here as usual:
Spine Unity Download
User avatar
Harald

Harri
Posts: 147


Return to Unity