StaticBatchingUtility 静态批处理工具

StaticBatchingUtility can prepare your objects to take advantage of Unity's static batching.

StaticBatchingUtility可以准备你的物体,利用Unity的静态批处理优势批处理。

This step is useful as a performance optimization allowing engine to reduce number of draw-calls dramatically, but keep amount of rendered geometry intact.

这步是非常有用的,作为性能优化允许引擎去减少大幅的draw-calls(描绘指令)数,但保持完整的渲染几何量。

By calling one of the Combine methods you will create an internal mesh which will contain combined geometry, however each original GameObject will be present in the scene and will be culled individually. The fact that GameObjects can be culled individually allows run-time to render the same amount of geometry as it would without batching, unlike combining geometry in the modeling tool. Combining geometry in the modeling tool prevents effecient culling and results in much higher amount of geometry being rendered.

通过调用Combine方法,将创建一个内部网格,其中包含合并的几何体,然而每个原始游戏物体,将出现在场景,并且被单独检选。事实上,GameObjects可以单独检选,允许运行时渲染同样数量几何体,因此没有批处理,不像在建模工具合并几何体。在建模工具合并几何体,防止生效的剔除和导致较高的几何体数量被渲染。

Note that you do not need to call Combine methods on objects which were already marked as "Static" in the Editor. They will be prepared for static batching automatically during the Build Player step.

注意,你不需要在物体上调用Combine方法,本来就在编辑器已经标识为“Static”。它们将准备在生成时,自动静态批处理。

IMPORTANT: only objects with the same material can be batched, thus it is useful to share as many textures/material as you can.

主要事项:仅在物体具有相同材质可以被批处理,因此你可以用于共享尽可能多的纹理/材质。

Class Functions类函数

Page last updated: 2011-3-25