• Unity
  • Spine-Unity 3.6 to 3.7 Upgrade Guide

The line referenced in the error message indicates that the file at skeletonDataPath cannot be read:

TextAsset spineJson = (TextAsset)AssetDatabase.LoadAssetAtPath(skeletonDataPath, typeof(TextAsset));

This most likely means that the .asset file for your data was not found because it has not been generated.
Can it be that the atlas file was exported with the extension ".atlas" instead of ".atlas.txt"? You can find this in the export options on the Spine editor side. That would explain it.

Related Discussions
...

When saving a project in Unity, it is reset in the state of animation: (For example, I have an animation "Idle", and when I save it, it is reset in the state "None" 馃檨 And this does not always happen!

Thanks for your description, I can now reproduce the error.
You can follow the issue at the following ticket url: [unity] Error upon Reimport All 路 #1248


I just fixed the "Reimport All" error, you can download the update here: Spine Unity Download.

However the second reported issue might still be remaining.
I have created a separate ticket for the SkeletonGraphic related issue: [unity] Error at SkeletonGraphic upon Reimport 路 #1252

Unfortunately, in my message above, nothing has changed: ( When you save the project, the animation is reset to the state "None"

12 days later

I solved this problem:

For example, I have an animation "Idle", and when I save it, it is reset in the state "None"

However, during testing it was showing that the second related problem which leads to the error message Skeleton JSON file not set for ... still persists. I discovered the cause of the problem in flawed behaviour of the Unity asset management system, unfortunately the solution took the whole week already since none of the numerous workarounds turned out to fix the problem.

Since so much time has passed already, I will publish the first part of the bugfix for you, so that the starting animation is no longer reset to None and will continue with the other part of the bugfix separately.


I have just uploaded new packages with your bugfix as described above, you can download them here as usual:
Spine Unity Download


We can happily announce that the second remaining error (yielding the error message Skeleton JSON file not set for ...) has just been fixed.

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

Harald wrote

I solved this problem:

For example, I have an animation "Idle", and when I save it, it is reset in the state "None"

However, during testing it was showing that the second related problem which leads to the error message Skeleton JSON file not set for ... still persists. I discovered the cause of the problem in flawed behaviour of the Unity asset management system, unfortunately the solution took the whole week already since none of the numerous workarounds turned out to fix the problem.

Since so much time has passed already, I will publish the first part of the bugfix for you, so that the starting animation is no longer reset to None and will continue with the other part of the bugfix separately.


I have just uploaded new packages with your bugfix as described above, you can download them here as usual:
Spine Unity Download


We can happily announce that the second remaining error (yielding the error message Skeleton JSON file not set for ...) has just been fixed.

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

Thank you!

a month later

So, I followed the upgrade steps exactly, but then had 86 errors in the Unity console... however after some digging around I found out it's just the new texture warning system. It was causing Spine not to compile (and thus not link into Visual Studio scripts). After doing a bunch of reading I figured out I could turn off the texture warnings in preferences, but then after that I had to clear console and then go alter one of my scripts to cause a recompile.

The warnings looked like this:

But my materials are using Sprites/Default so I am not using premultiply alpha.. seems like a warning about this stuff is okay, but an error that causes Spine not to compile is intended?

Thanks.

Thanks very much for reporting this issue and sorry for the inconvenience!

I have just commited a bugfix for the exception Material doesn't have a float or range property '_StraightAlphaInput'. I also removed the warnings in case of non-Spine shaders. So you should be able to enable the warnings again in the Spine Settings and receive neither errors nor warnings.

It will be included in the next unitypackage, published in the next few days.

Harald wrote

Thanks very much for reporting this issue and sorry for the inconvenience!

I have just commited a bugfix for the exception Material doesn't have a float or range property '_StraightAlphaInput'. I also removed the warnings in case of non-Spine shaders. So you should be able to enable the warnings again in the Spine Settings and receive neither errors nor warnings.

It will be included in the next unitypackage, published in the next few days.

Awesome, thanks for the quick response! Will it be in the 3.7 package or is it something in 3.8 beta?

Thanks again!