• RuntimesUnity
  • TintBlack SkeletonData import error

Hi! I have a Spine project, and the SkeletonDataAsset is refusing to import into Unity, with the following error:

Error reading skeleton JSON file for SkeletonData asset: effects_SkeletonData
Error reading animation: explosion
Color hexidecimal length must be 6, recieved: ff9a00ff
Parameter name: hexString

Digging into it, some slots in the Spine project are flagged as 'Tint Black', removing that fixes the import but then obviously doesn't allow us to use tint black functionality.

Runtime and version numbers both 4.1x

Any suggestions on how to proceed? What am I missing? Thanks!

Related Discussions
...

The error you're encountering, "Color hexadecimal length must be 6, received: ff9a00ff," suggests that there's an issue with how the color values are being interpreted during the import process. This is likely due to the 'Tint Black' functionality, which uses an 8-character hexadecimal to represent colors (including alpha), whereas the error message indicates an expectation of a 6-character hexadecimal (without alpha).

Given that both your runtime and Spine Editor versions are 4.1x, compatibility should not be an issue. However, the error message you're seeing was specifically addressed in a forum post discussing a runtime error related to color hexadecimal length. The post suggests that the error arises from a discrepancy in how color values are parsed by the Spine-Unity runtime.

To resolve this issue without removing the 'Tint Black' functionality, ensure that you are using the latest version of the Spine-Unity runtime. There might have been updates or fixes related to this issue after your current version. If updating does not resolve the issue, it could be a bug that needs to be reported to the Spine development team. Unfortunately, without direct access to bug tracking or the ability to submit a bug report on your behalf, the best course of action is to ensure your runtime is up to date.

per SpineBot, just updated the runtimes (spine-unity-4.1-2024-02-26) and this hasn't fixed the issue.

Same error, but more info with it this time?

Error reading skeleton JSON file for SkeletonData asset: effects_SkeletonData
Error reading animation: explosion
Color hexidecimal length must be 6, recieved: ff9a00ff
Parameter name: hexString
  at Spine.SkeletonJson.ReadSkeletonData (System.IO.TextReader reader) [0x01213] in C:\Users\[ME]\Assets\Spine\Runtime\spine-csharp\SkeletonJson.cs:368 
  at Spine.Unity.SkeletonDataAsset.ReadSkeletonData (System.String text, Spine.AttachmentLoader attachmentLoader, System.Single scale) [0x00014] in C:\Users\[ME]\Assets\Spine\Runtime\spine-unity\Asset Types\SkeletonDataAsset.cs:281 
  at Spine.Unity.SkeletonDataAsset.GetSkeletonData (System.Boolean quiet) [0x000a7] in C:\Users\[ME]\Assets\Spine\Runtime\spine-unity\Asset Types\SkeletonDataAsset.cs:180 
UnityEngine.Debug:LogError (object,UnityEngine.Object)
Spine.Unity.SkeletonDataAsset:GetSkeletonData (bool) (at Assets/Spine/Runtime/spine-unity/Asset Types/SkeletonDataAsset.cs:183)
Spine.Unity.Editor.SkeletonDataAssetInspector:InitializeEditor () (at Assets/Spine/Editor/spine-unity/Editor/Asset Types/SkeletonDataAssetInspector.cs:147)
Spine.Unity.Editor.SkeletonDataAssetInspector:OnEnable () (at Assets/Spine/Editor/spine-unity/Editor/Asset Types/SkeletonDataAssetInspector.cs:84)

@danthat Sorry that Spinebot was not really helpful.

Did you perhaps export your skeleton as version 4.1 from Spine Editor version 4.2-beta? In other words, what is the version number listed in your exported skeleton .json file? If it's something like 4.1-from-4.2, please note that exporting older versions if for recovering work in the Spine Editor only. It's not for runtime use.

See the documentation here:
http://esotericsoftware.com/spine-export#Version

No, Spine Editor version is 4.1.24, exported json says 4.1.24 as well.

Seems like one other user had a similar issue which was put down to version numbers but no clear resolution ever came of it.

Any other suggestions for things to try would be much appreciated!

  • Harald ответили на это сообщение.

    danthat No, Spine Editor version is 4.1.24, exported json says 4.1.24 as well.

    Thanks for the clarification. Could you then please share the problematic exported skeleton assets (the three files) with us? You can either attach them to a forum posting or send us an email to contact@esotericsoftware.com, briefly mentioning this forum thread URL so that we know the context.

    danthat Seems like one other user had a similar issue which was put down to version numbers but no clear resolution ever came of it.

    Why no clear resolution on this thread?
    The last statement by the user was that the runtime was likely version 3.8 and the editor version 4.0.

    Thanks, email sent.

    Why no clear resolution on this thread?

    Because there was no reply from the user saying "yes, that was it and it's fixed now" I just didn't feel like it had a definitive ending pointing to the version differences being 100% the cause of the problem 🙂

    @danthat Thanks for sending the reproduction assets. We will get back to you here on the forum once we've figured out what's going wrong.

    @danthat You have reported an issue which seems to have remained unnoticed for quite some time. We have just pushed a bugfix to both 4.1 and 4.2-beta branches. New spine-unity unitypackages are available for download:
    https://esotericsoftware.com/spine-unity-download
    Thanks for reporting!

    Issue ticket URL for later reference:
    EsotericSoftware/spine-runtimes2476

    Confirmed works this end, thanks for your help. Much appreciated 🙂

    Very glad to hear, thanks for letting us know. 🙂