ZhangHuan

已安装spine 4.0, unity 2020.3.17
有几个文本文件,它们不是spine的资源文件,且不是json文件
每次导入都会触发spine的报错,很烦

SkeletonDataCompatibility.cs
GetVersionInfo附近
VersionInfo fileVersion = new VersionInfo();
bool hasBinaryExtension = asset.name.Contains(".skel");
fileVersion.sourceType = hasBinaryExtension ? SourceType.Binary : SourceType.Json;

bool isJsonFileByContent = IsJsonFile(asset);
// file name don't have skel and not json
// if (false == false) then log error?
// if (hasBinaryExtension && isJsonFileByContent) ?
if (hasBinaryExtension == isJsonFileByContent) {
if (hasBinaryExtension) {
problemDescription = string.Format("Failed to read '{0}'. Extension is '.skel.bytes' but content looks like a '.json' file.\n"
+ "Did you choose the wrong extension upon export?\n", asset.name);
}
else {
problemDescription = string.Format("Failed to read '{0}'. Extension is '.json' but content looks like binary 'skel.bytes' file.\n"
+ "Did you choose the wrong extension upon export?\n", asset.name);
}
isSpineSkeletonData = false;
return null;
}
ZhangHuan
  • 帖子: 8

Harald

我们很抱歉给您带来麻烦。 不幸的是,我们还没有遇到这个问题。 您能否提供导致此错误消息的此类有问题的文件之一?

We are sorry for the troubles. Unfortunately we have not yet encountered this problem. Could you please provide one of such problematic files that cause this error message?
头像
Harald

Harri
  • 帖子: 3479

ZhangHuan

报错文件
您没有权限查看这个主题的附件。
ZhangHuan
  • 帖子: 8

Harald

感谢您发送复制文件。 我们在 4.0 分支上修复了这个问题,一个新的spine-unity unitypackage 可以像往常一样在这里下载:
Spine Unity Download
感谢举报!

签发票据 URL 以供日后参考:
https://github.com/EsotericSoftware/spine-runtimes/issues/1992
-----
Thanks for sending the reproduction file. We fixed the issue on the 4.0 branch, a new spine-unity unitypackage is available for download here as usual:
Spine Unity Download
Thanks for reporting!

Issue ticket URL for later reference:
https://github.com/EsotericSoftware/spine-runtimes/issues/1992
头像
Harald

Harri
  • 帖子: 3479


回到 中国Spine用户