Version: Unity 6.3 LTS (6000.3)
Language : English
Introduction to batching meshes
Batch static meshes at build time

Set up GameObjects for batching

For more information about batching, refer to Introduction to batching meshes.

Get the best results from batching

To get the best results from batching, do the following:

  • Share materials among as many GameObjects as possible.
  • If you have two material assets that are identical apart from their textures, combine the textures into a single, larger texture.
  • Profile the performance of your application with batching turned on and off.

Check whether Unity batches GameObjects

To check whether Unity batches GameObjects, open the Frame Debugger and check for either of the following:

  • Render passes called Draw Static or Draw Dynamic.
  • Combined Mesh in the event details of the Meshes section.

If Unity isn’t batching GameObjects, check the following for each GameObject:

  • The GameObject is active.
  • The GameObject has an enabled Mesh RendererA mesh component that takes the geometry from the Mesh Filter and renders it at the position defined by the object’s Transform component. More info
    See in Glossary
    component.
  • None of the materials in the Mesh Renderer component use shaders that have DisableBatching set to true.
  • The GameObject has an enabled Mesh FilterA mesh component that takes a mesh from your assets and passes it to the Mesh Renderer for rendering on the screen. More info
    See in Glossary
    component with a MeshThe main graphics primitive of Unity. Meshes make up a large part of your 3D worlds. Unity supports triangulated or Quadrangulated polygon meshes. Nurbs, Nurms, Subdiv surfaces must be converted to polygons. More info
    See in Glossary
    .
  • The mesh has a vertex count greater than 0, and hasn’t already been combined with another mesh.
  • The meshes use the same vertex attribute layout. For example, Unity can’t batch a mesh that uses UVs with one that doesn’t.

If you use static batching, check the following:

  • The GameObject uses the same mesh, shader variant, texture samplers, lightmap, and layer as other meshes you want to batch.
  • The mesh is not very small.
  • The mesh doesn’t use LOD fading.

Additional resources

Introduction to batching meshes
Batch static meshes at build time