- Modifié
置换贴图在Unity2019的移动端显示不正常
我们对一个节点(attachment)进行了换装(match),目的是显示一个文字的图片。正常显示时的版本:Unity 2018.4.30f1,Spine 3.8.95,Spine-CSharp 3.8(2020.12)。在Unity编辑器、安卓、IOS都可以正常显示。
我们把Unity升级到2019.4.34f1c1,其他条件都不变,在Unity编辑器显示是正常的,但是在任何安卓和IOS设备上都异常。
在Unity2019的编辑器中预览的经过换装(match)的贴图和材质如下
请问你们有什么建议吗?
您是否可能在重新打包的输入图集纹理中使用纹理压缩(“无”以外的任何内容)?
请参阅此文档部分,了解将导致重新打包纹理失败的有问题的设置:
spine-unity Runtime Documentation: 组合皮肤
重要提示: 如果重打包失败或产生意外问题, 可能源于以下原因:
禁用了读/写. 你可能需要在并入重打包texture的源textures上设置 Read/Write Enabled 参数. 启用了压缩: 需要确保源texture的Texture导入设置中 Compression 为 None , 而不是 Normal Quality. 质量层使用了half/quarter分辨率的textures: 这个是Unity的bug, 当使用half/quarter分辨率的texture时会复制错误区域. 确保项目设置中的所有质量层都使用全分辨率texture. 源texture不是2次texture但Unity将其放大为了最接近次数:a)从Spine导出时启用 Pack Settings 中的 Power of two, 或者b)确保Unity的Atlas Texture导入设置中将 Non-Power of Two 置为 None.
Are you perhaps using texture compression (anything other than None
) at your input atlas textures, which are repacked?
Please see this documentation section for problematic settings that will cause repacking textures to fail:
spine-unity Runtime Documentation: 组合皮肤
感谢您的回复。
我确定没有使用纹理压缩,并且所有设置都是正确的。
我仅仅只是升级了Unity版本到2019,并构建出APP,但运行时使用的Spine资源是从我们的服务器下载的以前的通过Unity2018导出的AssetBundle。这些资源在Unity2018构建的APP中是正常的。
我认为差异仅在Unity版本。另外,关于SpineAPI,我了解到Spine-CSharp 3.8(2020.12)是支持Unity2019的,您觉得此事与SpineAPI的版本有联系吗?
您还有其他建议吗?
感谢您验证您的设置对于重新打包是否正确。
如果您根本没有修改它并且只是将 Unity 从 2018 升级到 2019,我们认为这不是 spin-unity 运行时的问题。
也许这是 Unity 升级和现有资产包的问题。 您能否尝试从新的 Unity 2019 版本重新创建资产包是否可以解决问题? 您可以先尝试使用本地资产包,而不是更新服务器上的资产包。
Thanks for verifying that your settings are correct for repacking.
We do not think that it's a problem with the spine-unity runtime, if you haven't modified it at all and only upgraded Unity from 2018 to 2019.
Perhaps it is a problem with the Unity upgrade and the existing asset bundles. Could you please try whether re-creating the asset bundles from the new Unity 2019 version resolves the problem? You could have a try with a local asset bundle first instead of updating the asset bundles on your server.
很遗憾,用Unity2019创建的asset bundle仍然无法解决问题。
我是否应该构建一个简单的可以复现问题的APP,然后去调试相关的spine源码?
但是这仍然很困难,因为这个问题只在APP上出现,并且无法进行断点调试。
您还有任何可能的思路吗?
很遗憾听到重建资产包并没有解决问题。
那么您能否创建一个仍然显示此问题的最小 Unity 项目? 您可以将其作为 zip 包发送至 contact@esotericsoftware.com,并简要提及此论坛主题 URL,以便我们了解上下文。 然后我们可以看看它。
Sorry to hear that rebuilding the asset bundles did not resolve the problem.
Could you then please create a minimal Unity project that still shows this issue? You can send it as a zip package to contact@esotericsoftware.com, briefly mentioning this forum thread URL so that we know the context. Then we can have a look at it.
经过新旧工程对比,发现原因是图像质量设置。
我们以前一直使用very low,而新的工程默认是medium。
使用medium以上就显示正常了。
感谢社区的帮助。
我建议把此设置加入到Spine的文档的注意事项中,以帮助可能遇到此问题的开发者。
很高兴听到你想通了。
Glad to hear you've figured it out.
我假设您的问题与 spin-unity 文档页面上列表的第三个要点有关:
I would assume that your problem is related to the third bullet point of the list on the spine-unity documentation page:
"质量层使用了half/quarter分辨率的textures: 这个是Unity的bug, 当使用half/quarter分辨率的texture时会复制错误区域. 确保项目设置中的所有质量层都使用全分辨率texture."
重要提示: 如果重打包失败或产生意外问题, 可能源于以下原因:
禁用了读/写. 你可能需要在并入重打包texture的源textures上设置 Read/Write Enabled 参数.
启用了压缩: 需要确保源texture的Texture导入设置中 Compression 为 None , 而不是 Normal Quality.
质量层使用了half/quarter分辨率的textures: 这个是Unity的bug, 当使用half/quarter分辨率的texture时会复制错误区域. 确保项目设置中的所有质量层都使用全分辨率texture.
源texture不是2次texture但Unity将其放大为了最接近次数:a)从Spine导出时启用 Pack Settings 中的 Power of two, 或者b)确保Unity的Atlas Texture导入设置中将 Non-Power of Two 置为 None.
还是您的问题与此描述不同? 如果是这样,您能否更详细地描述它,以便我们将其添加到列表中?
Or was your problem different from this description? If so, could you please describe it in more detail so that we can add it to the list?
lxy437101392 a écrit经过新旧工程对比,发现原因是图像质量设置。
我们以前一直使用very low,而新的工程默认是medium。
使用medium以上就显示正常了。
感谢社区的帮助。
我建议把此设置加入到Spine的文档的注意事项中,以帮助可能遇到此问题的开发者。
你的贴子真是及时雨,我们遇到了一样的问题,正在头疼。不知道你是如何对比项目的,最后能定位到这个设置不同,希望可以指点一下,我们费了好大劲也没找到问题所在...
恐怕自动翻译没有很好地为我翻译你的帖子。 您能否描述一下您目前面临的问题,如果您检查过上述帖子中的任何一点是否可能也是您的问题? 或者您在查找上面帖子中列出的某些设置时遇到问题?
I'm afraid automatic translation has not translated your posting very well for me. Could you please describe what problems you are currently facing, and if you have checked if any of the points in the postings above are probably also your problem? Or are you having problems finding certain settings that are listed in the postings above?
Harald a écrit恐怕自动翻译没有很好地为我翻译你的帖子。 您能否描述一下您目前面临的问题,如果您检查过上述帖子中的任何一点是否可能也是您的问题? 或者您在查找上面帖子中列出的某些设置时遇到问题?
I'm afraid automatic translation has not translated your posting very well for me. Could you please describe what problems you are currently facing, and if you have checked if any of the points in the postings above are probably also your problem? Or are you having problems finding certain settings that are listed in the postings above?
Sorry, I didn't make myself clear. I've already solved my problem due to this post. I just ask him how to compare two projects with a different version of Unity. Because I had this problem and didn't find a way to locate it.
Oh, thanks for the clarification, very glad to hear that you've solved your problem already!
While there are certainly many ways to compare two projects, as a programmer I would suggest using some kind of diff-tool that supports folder comparison. Then you could compare the ProjectSettings
directory of both projects. If firing up diff-tools manually is too complicated, you could also use a test repository in your desired version control system and first copy one ProjectSettings
directory into it, commit the changes, and then copy the other project's ProjectSettings
directory over it, then you can easily see any modifications as well.
Harald a écritOh, thanks for the clarification, very glad to hear that you've solved your problem already!
While there are certainly many ways to compare two projects, as a programmer I would suggest using some kind of diff-tool that supports folder comparison. Then you could compare the
ProjectSettings
directory of both projects. If firing up diff-tools manually is too complicated, you could also use a test repository in your desired version control system and first copy oneProjectSettings
directory into it, commit the changes, and then copy the other project'sProjectSettings
directory over it, then you can easily see any modifications as well.
Thanks, Harald. I get it.