To draw an object on the screen, the engine has to issue a drawcall to the graphics API (e.g. OpenGL or Direct3D). The graphicsAPI does significant work for every draw call, causing performanceoverhead on the CPU side.
Unity can combine a number of objects at runtime and draws themtogether with a single draw call. This operation is called"batching". The more objects Unity can batch together, the betterrendering performance (on the CPU side) you can get.
Built-in batching support in Unity has significant benefit oversimply combining geometry in the modeling tool (or usingthe
Materials
Only objects sharing the same material can be batched together.Therefore, if you want to achieve good batching, you need to shareas many materials among different objects as possible.
If you have two identical materials which differ only in textures,you can combine those textures into a single big texture - aprocess often called
If you need to access shared material properties from the scripts,then it is important to note thatmodifying
Dynamic Batching
Unity can automatically batch moving objects into the same drawcall if they share the same material and fulfill other criteria.Dynamic batching is done automatically and does not require anyadditional effort on your side.
- Batching dynamic objects has certainoverhead
per vertex, so batching is appliedonly to meshes containing lessthan 900 vertex attributesin total. - If your shader is using VertexPosition, Normal and single UV, then you can batch up to 300 verts;whereas if your shader is using Vertex Position, Normal, UV0, UV1and Tangent, then only 180 verts.
- Please note: attribute count limitmight be changed in future
- Generally, objects should be usingthe same transform scale.
- The exception is non-uniform scaledobjects; if several objects all have different non-uniform scalethen they can still be batched.
- Using different material instances -even if they are essentially the same - will make objects notbatched together.
- Objects with lightmaps haveadditional renderer parameter: lightmap index and offset/scale intothe lightmap. So generally dynamic lightmapped objects should pointto exactly the same lightmap location to be batched.
- Multi-pass shaders will breakbatching. Almost all unity shaders supports several lights inforward rendering, effectively doing additional pass for them. Thedraw calls for "additional per-pixel lights" will not bebatched.
- Objects that receive real-timeshadows will not be batched.
Static Batching
Static batching, on the other hand, allows the engine to reducedraw calls for geometry of any size (provided it does not move andshares the same material). Static batching is significantly moreefficient than dynamic batching. You should choose static batchingas it will require less CPU power.
In order to take advantage of static batching, you need explicitlyspecify that certain objects are static andwill

Using static batching will require additional memory for storingthe combined geometry. If several objects shared the same geometrybefore static batching, then a copy of geometry will be created foreach object, either in the Editor or at runtime. This might notalways be a good idea - sometimes you will have to sacrificerendering performance by avoiding static batching for some objectsto keep a smaller memory footprint. For example, marking trees asstatic in a dense forest level can have serious memory impact.
Static batching is only available in Unity Pro for eachplatform.
Other batching tips
Currently, only
Semitransparent shaders most often require objects to be renderedin back-to-front order for transparency to work. Unity first ordersobjects in this order, and then tries to batch them - but becausethe order must be strictly satisfied, this often means lessbatching can be achieved than with opaque objects.
Some parts of Unity's rendering do not have batching implementedyet; for example rendering shadow casters, camera's depth texturesor GUI will not do batching.