- Home /
Frame Debugger: "Objects have different batching keys"
While debugging why objects using the same material aren't batched I came across very strange explanations from the Frame Debugger:
"Objects have different batching keys. This is usually caused by using different vertex streams on Particle Systems, or by mixing Lines and Trails, or by mixing lit and unlit geometry"
"Objects are rendered using different rendering functions"
This all concerns game objects that usually have one root particle system and then multiple children particle systems within. All particle systems are using the very same material.
I found zero articles on the Internet about those kind of errors. Anyone been across these problems??
First what shader is your particle material?
Do you see 2 materials appear at the bottom of particle objectinspector?
Because the sys msg says "vertex stream", you may go to particle system-renderer module, enable "custom vertex streams" to check if all particle sustems share the same streams.
hi, thanks for commenting, the shader used is mobile/particles/additive. I checked what you said and all particle systems have the same vertex streams, in this order:
Position
Normal
Color
UV
I guess those are the default ones and for sure they weren't changed at any point. The only difference between the different renderers is in the fields "$$anonymous$$ax Particle Size" and "Render Alignment".
I reproduced the "Objects are rendered using different rendering functions" report which happens when you sandwich a mesh particle system with other billboard particle systems, this happens anyway even if they share the same material, mesh and billboard particle drawcalls can NEVER be batched together. If possible, use "order in layer" to make sure mesh particle system isn't sandwiched so batching of billboard particle drawcalls isn't obstructed.