Dynamic Batching has the following three important qualities:
- Batches are generated at runtime (batches are dynamically generated)
- The objects that are contained within a batch can vary from one frame to the next, depending on what meshes are currently visible to the
Main Camera
view (batch contents are dynamic) - Even objects that can move around the Scene can be batched (it works on dynamic objects)
Hence, these attributes lead us to the name Dynamic Batching.
If we return to the Player Settings
page and enable Dynamic Batching
, we should see that the number of batches drops from 9 down to 6. Dynamic Batching automatically recognizes that our objects share Material and mesh information and is, therefore, combining some of them into a larger batch for processing. We should also see a different list of items in the Frame Debugger, demonstrating that meshes are now being dynamically batched.
As we can see from the Frame Debugger, our four boxes have been combined into a single...