Q; The ways of optimizting?

  1. Static Batching.

    Objects are explicitly specified to be static. It can’t have any change in transform. It also requires additional memory to store combined geometry. 100 objects are 100 copy.

  2. Dynamic Batching

    The mesh and materials need to be the same, and the mesh must have less than 300 vertices. The objects should not moving around. Shaders should have one pass. Instanced materials and lightmapping are not allowed. Be warned, if there’s no objects meet the dynamic batching requirement, it’s actually a waste of resource to check those objects.

  3. GPU Instancing

    Render multiple copies of the same mesh at once. It’s useful for objects as buildings, trees, grass or other appear repeatedly. Mesh must be identical, but each instance can have different parameters, like color or scale, to add variation and reduce the appearance of repetition. Submesh might break this.

  4. Render Queue

    It will manually change rendering order of objects on the screen. ABCBBD can turn to ABBBCD. However, it requires responsibility and careful organizing. Manually changing shader’s queue might result in unwanted graphic effect. It’s not a panacea.

  5. Materials and a scene Divide objects and materials to background, midground, and foreground, so it will help on batching and render queue sorting.

  6. Naming Please take responsibility on naming objects and materials. Random names and pure numbers only add more obstacles in the way of optimization.

  7. Skinned Mesh Renderer doesn’t support batching.


Smart trick:

Bake the light map and remove some objects on the floor will leave the object’s on the floor. It’s a trick to add some color to the ground. But the object’s shadow and light setting need to be on.