Static batching

Unity offers a second batching mechanism known as static batching. This batching feature is similar to dynamic batching in a couple of ways, in that the objects that are to be batched are determined at runtime based on what's visible to the camera, and the contents of these batches will vary from frame to frame. However, there is one very important difference: it only works on objects that are marked Static, hence the name static batching.

The static batching system has its own set of requirements:

  • As the name implies, the meshes must be flagged as Static (specifically, Batching Static)
  • Additional memory must be set aside for each mesh that is being statically batched
  • There is an upper limit on the number of vertices that can be combined in a static batch that varies per graphics API and platform, which is around 32,000–64,000 vertices (check out the documentation/previously mentioned blog post for specifics)
  • The mesh instances can come from any source mesh, but they must share the same material reference

Let's cover some of these requirements in more detail.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.146.105.137