很遗憾听到问题仍然存在。经过一番调查,我注意到当再次使用 Spine 4.0 导出同一个 Spine 项目并在 Spine-unity 中导入时(升级复制项目的副本后),它将以更好的非模糊质量显示。可能是您用于导出图集纹理的 Spine 3.7 版本在以 0.5 比例导出图集纹理时存在问题。
比较时要注意的一件事:为了比较场景中的字符 2 和 3,您应该设置 Scale_1/spine_idle_1.png
的 Texture Import 设置以启用 Generate Mipmaps
。否则,在缩小时您将看不到线性插值,而是在边缘看起来更锐利且有点“锯齿”。启用 mipmap 后,它比 0.5 缩小的图像更好。
我在您的项目中发现的一个重要说明:您将 SkeletonGraphic
材质参数设置为 spine_idle_1_Material
,但必须将其分配给具有 Spine/SkeletonGraphic*
着色器(或任何与 CanvasRenderer
兼容的 UI 材质)的材质)。通常,您将使用 Spine-unity 运行时附带的SkeletonGraphicDefault.mat
材质,或创建此材质的副本并根据需要对其进行修改。重要的是不要使用普通的 MeshRenderer
材质,例如Spine/Skeleton
,因为这会导致在某些设备(例如 Android)上显示错误。
Sorry to hear that the problem still persists. After some investigation, I noticed that when exporting the same Spine project again using Spine 4.0 and importing in spine-unity (after upgrading a copy of your reproduction project), it will display in better non-blurry quality. It might be that your version of Spine 3.7 used for exporting the atlas texture had an issue with exporting atlas textures at scale 0.5.
One thing to note when comparing: in order to compare characters 2 and 3 in your scene, you should set the Texture Import setting of Scale_1/spine_idle_1.png
to have Generate Mipmaps
enabled. Otherwise, you will not see linear interpolation when minifying, it will instead appear sharper and a bit "jaggy" at edges. With enabled mipmaps, it compares better to a 0.5 downscaled image.
An important note which I discovered in your project: You have the SkeletonGraphic
material parameter set to spine_idle_1_Material
, but it must be assigned to a material with a Spine/SkeletonGraphic*
shader (or any CanvasRenderer
compatible UI material). Typically you will use the included SkeletonGraphicDefault.mat
material that comes with the spine-unity runtime, or create a copy of this material and modify it as you need. It is important to not use a normal MeshRenderer material such as Spine/Skeleton
, as this will lead to display errors on some devices, such as Android for example.