Hi!
We ran into a problem while trying to get a spine export to work in Unity, we ran into problems with Binary export (out of bounds), I will post a troubleshoot of it later if we cannot solve it.
So I wanted to validate that the problem is about Binary export and so we made a JSON export.
I kept getting error that "extension seems to be skel.bytes but content looks like json".
On a JSON export.
So I started digging.
SkeletonDataCompatibility.cs on line 91 has a check
bool hasBinaryExtension = asset.name.Contains(".skel");
which will always return true, as the filename is unity seems to always be ".skel", regardless if it's binary or json.
So I changed the check into
bool hasBinaryExtension = asset.name.Contains(".skel.bytes");
and it started working, well after I added the same change in two other locations at:
SkeletonDataAsset.cs line 166
bool hasBinaryExtension = skeletonJSON.name.ToLower().Contains(".skel");
and
AssetUtility.cs line 120
if (skeletonDataPath.Contains(".skel")) {
After these changes, the JSON import worked correctly.
However, it obviously breaks our earlier binary animation that we had, as it is not flagged as binary now.
We are using Spine 3.8.xx (have to check our animator which exact version he is using) and latest 3.8.0 unity plug in as of date of this post.
Our Unity version is 2019.4.25f1
The files in file explorer show them as "skel.bytes" and "skel.json".
EDIT:
I changed the code for now to check for naming convention for JSON, so we can work with JSON file and binary files. We'll just have to add "JSON" to the end of our work asset's name. It's not pretty, but works for now.
SkeletonDataCompatbility.cs line 91:
bool hasBinaryExtension = !(asset.name.Contains("_JSON")) && asset.name.Contains(".skel");
UtilityAsset.cs line 120:
if (!skeletonDataPath.Contains("_JSON") && skeletonDataPath.Contains(".skel")) {
SkeletonDataAsset.cs line 166
bool hasBinaryExtension = !(skeletonJSON.name.Contains("_JSON")) && skeletonJSON.name.ToLower().Contains(".skel");