• EditorBugs
  • spine 版本 3.8,unity spine runtime v2.5,导入.skel.bytes 文件后报下列错误,要如何解决

试了spine-unity-3_7 和spine-unity-3.8 同样报错

EndOfStreamException: Attempted to read past the end of the stream.
Spine.SkeletonBinary.ReadFully (System.IO.Stream input, System.Byte[] buffer, System.Int32 offset, System.Int32 length) (at Assets/Spine/Runtime/spine-csharp/SkeletonBinary.cs:899)
Spine.SkeletonBinary.ReadString (System.IO.Stream input) (at Assets/Spine/Runtime/spine-csharp/SkeletonBinary.cs:892)
Spine.SkeletonBinary.ReadSkeletonData (System.IO.Stream input) (at Assets/Spine/Runtime/spine-csharp/SkeletonBinary.cs:154)

  • Misaki відповіли на це.
    Related Discussions
    ...

    The error you're encountering, "EndOfStreamException: Attempted to read past the end of the stream," typically occurs when there is a mismatch between the Spine Editor version used to export the skeleton data and the spine-unity runtime version used to import it. For Spine version 3.8, you should ensure that you are using the corresponding spine-unity runtime version 3.8. If you are using spine-unity runtime v2.5, it is likely incompatible with the data exported from Spine 3.8. Make sure to update your spine-unity runtime to version 3.8 to match your Spine Editor version. Additionally, ensure that the .skel.bytes file is not corrupted and was exported correctly from the Spine Editor.

    Evan2245 As Spinebot answered, the version of the Spine editor from which this skeleton data was exported must match the version of the Spine runtime installed in the Unity project from which you want to import it. Therefore, you need to install spine-unity 3.8 in your Unity project to work with skeleton data exported from Spine 3.8.

    You can download the unitypackage for spine-unity 3.8 from the following section of the download page:
    https://zh.esotericsoftware.com/spine-unity-download#spine-unity-unitypackages