Help in regard with STATIC Batching.

Hello Devs,

I am having issues with static batching and I wanted your help in regard to that. I am just going to give the most primitive scenario I have.

I have a cube with a material on top of it. That material is mobile/Bumped Diffuse shader.

Now, I have a OnTriggerEnter script on that cube. Hence if the cube is in contact with the player, it triggers an event on the player’s script. I have lots of cube on a particular scene. I do spawn and despawn those cubes on a timely basis depending upon scenario. Now as I have lots of cubes on the environment, I pool them. I use PoolManager from Path-o-Logical games.

These cubes (one prefab) are
Static and use the same material.
I use only one light = Directional Light

But they do not get batched. I am not aware as of why they do not get batched.

Can you guys help me on this issues?

Also I did post this on Path-o-Logical forum. Please ignore the first half of that post. I did find a solution to that problem and the solution is here.

Your help is appreciated.

Thank you.

Static batching only works on objects that are completely static and do not have any dynamic behavior of any kind. So no spawning, etc.

–Eric

Oh okay and with static batch does the scale of each object matter even though they share the same prefab and material.

Yes, the objects should have the same scale.

–Eric

Eric, then it is possible to Dynamically batching them?

I have loads of cubes on the scene which just Spawn In and Out. I really want to reduce the drawcalls.

If there is n’t any other way, maybe I could make sure that all the instances from the same prefab are spawned during start().

I highly appreciate your help.
thank you.