我们刚刚在 4.1 分支中添加了一个默认的 SkeletonGraphicFill
材质(它很快也会合并到 4.2-beta 中)。 一个新的 spin-unity unitypackage 可供下载:
esotericsoftware.com/spine-unity-download
关于在 SkeletonGraphic
组件中具有 Fill Color
属性:虽然这很好,但不幸的是问题在于细节:应该在共享材质上设置共享颜色,还是应该自动创建材质实例和 那里改颜色? 虽然大多数时候您希望创建一个单独的材质实例,但在某些情况下您可能希望为标准颜色保留共享材质。
普通的 Color
属性的优点是它设置了 skeleton.color
,因为它设置了顶点颜色,所以在绘制调用开销方面是免费的。
We have just added a default SkeletonGraphicFill
material at the 4.1 branch (it will soon be merged to 4.2-beta as well). A new spine-unity unitypackage is available for download:
esotericsoftware.com/spine-unity-download
Regarding having a Fill Color
property at the SkeletonGraphic
component: While it would be great, unfortunately the problem lies with the details: Should a shared color be set on the shared material, or should it be automatically creating a material instance and change the color there? While most of the time you will want to create a separate material instance, there might be situations where you'll want to keep a shared material for a standard color.
The normal Color
property comes with the advantage that it sets the skeleton.color
which is free in terms of draw call overhead since it sets the vertex color.