请注意,将剪裁多边形与许多顶点组合起来会给 CPU 带来沉重的处理负载,因为每个三角形都需要被剪裁。 此处对此进行了描述:
剪裁附件 - Spine用户指南: 性能
由于您使用的是具有 4 个顶点的裁剪多边形,因此强烈建议使用 Unity 遮罩组件,例如 SpriteMask
、Mask
和 RectMask2d
。
如果您不能用 Unity 蒙版组件替换裁剪多边形,我们强烈建议尝试将裁剪多边形从 4 个顶点减少到 3 个顶点(裁剪多边形的大小无关紧要),并减少网格中的三角形数量 .
Please note that combining clipping polygons with many vertices will put a heavy processing load on the CPU, as each triangle needs to be clipped. This is described here:
剪裁附件 - Spine用户指南: 性能
Since you are using a clipping polygon with 4 vertices, it is highly recommended to use Unity masking components instead, such as SpriteMask
, Mask
and RectMask2d
.
If you can't replace the clipping polygon with a Unity mask component, we would highly recommend trying to reduce the clipping polygon from 4 to 3 vertices (size of the clipping polygon does not matter), and reducing the number of triangles in the mesh.