I have an object that I imported from blender. It has 4 child objects and they all use the same material, they are very minimal in vert count and use a simple shader with one pass. I thought they would batch, but that is not the case. I read here ( Unity - Manual: Draw call batching ) that:
-Generally, objects should be using the same transform scale.
-The exception is non-uniform scaled objects; if several objects all have different non-uniform scale then they can still be batched.
The scale of my parent object is ( 6, 1.839, 3.08 ) and the 4 child objects are ( 1, 1, 1 ) in scale. Is this where my problem has occurred? How do I fix it?
Just guessing here, but are you also assigning the same instantiation of the material to your objects? I don’t know if it batches if you instantiate the same material in different variables.
First of all what kind of batching do you expect?
static batching? If so:
- are your objects marked as static?
- do you have unity pro?
If you expect them to batch dynamically, do:
- your objects have a vert-count around 300?
- you positioned your objects not too far apart?
For either of those, make sure you use the same material instance (like ffxz7ff mentioned). That means never touch the material property or it will create a duplicate for this object. Always use sharedMaterial(s).
Finally re-read the batching page at least two times since all that is mentioned there