Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseFor some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
ClosestaticBatchRoot | 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.