• Runtimes
  • Can't create skeletonAssetData Unity (InvalidCastException)

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

I exported from 3.8.72 and into Unity 2019.1.8f1 with the runtime from 2019-09-05, and get this error when dragging the 3 exported files into Unity. The _Atlas and _Material files are created, but not _SkeletonData.

The spine file is based on the Gunman asset, and I think the export settings are pretty default.

How can I fix this? Thanks!

InvalidCastException: Cannot cast from source type to destination type.
Spine.Unity.Editor.SpineEditorUtilities.GetRequiredAtlasRegions (System.String skeletonDataPath) (at Assets/Spine/spine-unity/Editor/SpineEditorUtilities.cs:913)


I tried to open the project with 2019.2.1 instead, but that gave me this error instead:
Assets/SpineMen/Scripts/Boxman/BoxmanController.cs(29,19): error CS0234: The type or namespace name 'Modules' does not exist in the namespace 'Spine.Unity' (are you missing an assembly reference?)

After I deleted that and all boxmen, i managed to get it working. But does this mean it doesn't work in 2019.1 or did I do something wrong?

The export settings all look good, and exporting from 3.8 and using the resulting assets in unity with spine-unity from 2019-09-05 should also work as intended. Where is the SpineMen/Boxman asset from? To my knowledge, this is not part of our runtimes or the Gunman asset. I would guess that since you deleted the asset and things started to work, that the issue lies with that asset.

Thanks, the boxman/spinemen folders were in the Gunman sample project to test the controls. I think I use the 2018 version of the gunman. After deleting the gameobjects and conflicting scripts i got it working. I might have broken the project somehow, but you might wanna check that out 🙂

Ah sorry, I'm not super familiar with the Gunman asset. Guess we have to update it!

12 дней спустя

We are sorry for the inconvenience! The asset packs have just been updated to spine-unity 3.8.
Please re-download the packages and extract them to a clean location (do not unzip it over an old existing project).

Thanks for reporting!