• Unity
  • Issue importing spine files NullReferenceException

  • Изменено
Related Discussions
...

Hi. Need help on this. When i trying to import spine 2.1.27 files for this particular character i've got a laert:

NullReferenceException: Object reference not set to an instance of an object
SpineEditorUtilities.InstantiateSkeletonAnimator (.SkeletonDataAsset skeletonDataAsset, System.String skinName) (at Assets/spine-unity/Editor/SpineEditorUtilities.cs:1044)
SpineEditorUtilities.InstantiateSkeletonAnimator () (at Assets/spine-unity/Editor/SpineEditorUtilities.cs:1023)

Wanna say that the other characters are fine.

Is that the whole log?

I've copied all from console window. Two warnings
GameObject (named 'New SkeletonAnimation') references runtime script in scene file. Fixing!
and above.

What exactly were the steps for this to happen?
And what was your file? Was it json?
Are you using the latest runtime or the older 2.1-compatible one?

5 дней спустя

I using 2.1 compatible runtime. And few my characters imported fine. But current one is unable to import.
I did the same steps as for others. I've exported it from spine with these settings:
https://gyazo.com/3dbd4fe567ce4338e7d80ddd3118ccdc

All characters after using mecanim in Unity have this options:
https://gyazo.com/6cb96b0ac5265be558e1b302a0019130

but for current character i have this look after applying mecanim:
https://gyazo.com/13fbc12e4bb3c65e1e651a116447781c

I can post project file if necessary


25 Apr 2016, 10:00


Any assistance?


27 Apr 2016, 13:33


The project is frozen at this time due to this issue. Need assistance.

I don't know how much we can help with cryptic error log. They make no sense at all.

You can PM me your exported skeleton and atlas or send it to unity@esotericsoftware.com
and we can test them out.

Maybe send 1 working set, and the one that doesn't import properly.

Hi. Thanks for reply. We have found a solution. Delete all animations one by one to find the issue. When we found problematic animations we remade it and now seems all ok.

Weird. What made you think it was animations?

6 дней спустя

The main problem in animation that they have a glitch in unity. If the same object for example have opacity parameter animated from 100 to 0 and next animation which contain the same object have no keyframes at this parameter. In this case object which have no keyframes become animated from 0 to 100 opacity.
The solution is to set up keyframes even the object have no animation. IE. from 100 to 100 opacity.