staticBatchRoot | The GameObject that should become the root of the combined batch. |
StaticBatchingUtility.Combine
prepares all children of the staticBatchRoot
for static batching.
A GameObject is only eligible for static batching using this method when all of the following criteria are met:
DisableBatching
tag set to true.When you use this method, you do not need to mark a GameObject as Batching Static using the Inspector window’s Static check box to make it eligible for batching.
Once combined, children cannot change their Transform properties; however, you can change the transform properties of staticBatchRoot
.
See also: Mesh.CombineMeshes, Mesh.isReadable.
gos | The GameObjects to prepare for static batching. |
staticBatchRoot | The GameObject that should become the root of the combined batch. |
StaticBatchingUtility.Combine prepares all GameObjects contained in gos
for static batching. staticBatchRoot is treated as their parent.
StaticBatchingUtility.Combine prepares all GameObjects contained in gos
for static batching. staticBatchRoot is treated as their parent.
A GameObject is eligible for static batching using this method only when all of the following criteria are met:
DisableBatching
tag set to true.When you use this method, you do not need to mark a GameObject as Batching Static using the Inspector window’s Static check box to make it eligible for batching.
Once combined, GameObjects contained in gos
cannot change their Transform properties; however, you can move staticBatchRoot
.
See also: Mesh.CombineMeshes, Mesh.isReadable.