niezhijing

我的项目目前在使用GetRemappedClone 和Skin.SetAttachment来实现换装,因为服装很多自由度比较高,还要动态更新所以新增的服装图集需要压缩所以无法使用GetRepackedSkin接口,这就导致了runtime下材质球数量过高,有什么办法可以解决这个问题么,期待你的回答
Nemaš dopuštenje za pregledavanje privit(a)ka dodan(og)ih postu.
niezhijing
  • Postovi: 14

Harald

为什么要使用压缩纹理,这会阻止您使用GetRepackedSkin? 如果您可以切换到未压缩的纹理,则可以将所有内容打包到单个图集纹理中。

一般来说,我们不建议过度使用 GetRemappedClone。 相反,我们建议按照 here 的描述组合皮肤(即使不重新打包),并从 Spine 导出更大的图集纹理以用于 例如 多只眼睛、眉毛、面孔等。此皮肤 API 还在“混合和匹配皮肤”示例场景中进行了演示。

除此之外,您可以以更好的方式安排您的抽奖顺序,以便您分组,例如 您的眼部皮肤纹理使用,而不是例如 7 画眼睛和眉毛。 有关详细信息,请参阅 here 的 spin-unity 文档页面部分。
-----
Why are you using compressed textures, which prevent you from using GetRepackedSkin? If you can switch to uncompressed textures you could pack everything into a single atlas texture.

In general using GetRemappedClone is not something that we would recommend to use excessively. Instead we would recommend combining skins (also if not repacking them) as described here and having larger atlas textures exported from Spine for sets of e.g. multiple eyes, eyebrows, faces, etc. This skin API is also demonstrated in the Mix and Match Skins example scene.

Apart from that, you could arrange your draw order in a better way so that you group e.g. your eye skin texture usage, instead of having e.g. 7 draw calls for eyes and eyebrows. Please see the spine-unity documentation page section here for details.

---

让我们继续在此论坛主题上以相同的主题进行讨论:
Too many material due to dynamic reload
-----
Let's please continue the discussion over at this forum thread with the identical topic:
Too many material due to dynamic reload
Avatar
Harald

Harri
  • Postovi: 4101


Natrag na 中国Spine用户