用户工具

站点工具


侧边栏



Unity3D中文文档

script:unityengine:classes:staticbatchingutility:staticbatchingutility

StaticBatchingUtility 静态批处理工具

class in UnityEngine

Description 描述

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

静态批处理工具可以适用于你的对象具有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.

该步骤主要用于性能优化,允许引擎减少绘制调用的数量,但是保持渲染的完整几何体的数量。

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 efficient culling and results in much higher amount of geometry being rendered.

通过调用其中一个相结合的方法,您将创建一个内部的网格,其中将包含合并的几何体,然而每个原始的游戏物体将出现在现场,并且将单独剔除。事实上游戏对象可以单独剔除出来,允许运行时呈现相同数量的几何形状,因此没有批处理,不像在建模工具中合并几何体。在建模工具中组合几何体阻碍有效剔除和导致更多数量的几何体被渲染。

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.

注意在编辑器中对象已经标记为静态后你不需要去调用组合方法。它们会在建立Player步骤期间自动准备为静态批处理。

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

注意:仅材质相同的对象可以批处理,因此用于该处理和你使用的贴图/材质同样多。

Static Functions 静态函数

CombineCombine will prepare all children of the staticBatchRoot for static batching.
合并属性将准备为所有静态根的子集进行静态批处理。
script/unityengine/classes/staticbatchingutility/staticbatchingutility.txt · 最后更改: 2016/08/02 05:36 (外部编辑)