• 中文
  • 能添加一个 SkeletonGraphic Fill shader 么?

  • Изменено
Related Discussions
...

我想让我在UI里的角色,有时能填充自定义的颜色(完全不透明),目前的SkeletonGraphic Shader,除了黑色外,其它的颜色都不行

你们能添加一个SkeletonGraphic Fill Shader么?就像普通的Skeleton Fill Shader 一样


I want my character in the UI to sometimes be filled with a custom color (completely opaque), the current SkeletonGraphic Shader, no other colors except black

Can you guys add a SkeletonGraphic Fill Shader? Just like a normal Skeleton Fill Shader

我们刚刚在 4.1 和 4.2-beta 分支上添加了一个“Spine/SkeletonGraphic Fill”着色器。 新的 spin-unity unitypackages 可供下载:
spine-unity Download

We have just added a Spine/SkeletonGraphic Fill shader on both 4.1 and 4.2-beta branches. New spine-unity unitypackages are available for download:
spine-unity Download

@Harald 非常感谢!支持非常的快速!

两个小的建议:
01.你们没有创建对应的材质,我自己创建了。建议你们在包里也创建一个,方便新手

02.如果能在图上的地方(Color)修改材质的颜色就方便了。虽然现在可以通过代码替换材质


@Harald thank you very much! Support is very fast!

Two small suggestion:

  1. You didn't create the corresponding material(SkeletonGraphicFill), I created it myself. It is recommended that you also create one in the package, which is convenient for newbies

  2. if you can modify the color of the material in the place on the map (Color), it will be great. Although it is now possible to replace the material by code

我们刚刚在 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.