只有在所有实例中使用相同的纹理时,批处理才会起作用。当 Unity 批处理多个 Sprite 时,仅仅是因为它在幕后将多个较小的纹理组合成一个较大的 atlas 纹理,然后可以在具有看似不同材质的多个实例之间共享。
SRP 批处理器也不会解决与不同纹理相关的任何问题。它可能只有助于非纹理属性,如材质颜色。
所以简而言之,不幸的是,只能通过组合更多实例以使用单个共享图集纹理来减少批次数量。您通常会通过命令行界面而不是与每个骨架导出一起打包图集来做到这一点。
这是假设您没有看到单个骨架实例的多个批次(例如,由于多个混合模式或单个骨架的多个图集纹理)。如果是这种情况,那么优化绘图顺序或将附件图像分组到图集页面可能会有所帮助。
Batching will only work when the same texture is used across all instances. When Unity batches multiple Sprites, it is only because behind the scenes it is combining multiple smaller textures to a larger atlas texture that can then be shared between multiple instances with seemingly different materials.
The SRP batcher will also not resolve any of the problems related to different textures. It may only help with non-texture properties like material color.
So in short, unfortunately the number of batches can only be reduced by combining more instances to use a single shared atlas texture. You would typically do this by packing the atlas via the command line interface instead of alongside each skeleton export.
This is under the assumption that you are not seeing multiple batches for a single skeleton instance (e.g. due to multiple blend modes or multiple atlas textures for a single skeleton). If this is the case, then optimizing the draw order or grouping of attachment images to atlas pages could help.