Hi folks,
Here’s the situation:
I have an array of 10 quads and 2 materials (5 to a material). They all sit at 0,0,0 and the DrawCalls show as 2 (10 batched). All good.
My script moves the objects to touched areas of the screen. This is where it gets weird, and Dynamic Batching appears to break:
If I move five Material_1 quads, they remained batched. However, if I alternate between moving Material_1 and Material_2, they sometimes leave their batch group and appear as unique Draw Calls.
Because the behaviour is inconsistent, but always testable, I can’t believe it’s a natural limitation of Dynamic Batching (which supports moving batch members).
I’ve tried this with the quads parented to a root, unparented to anything, running a script, without a script…no avail.
Any ideas or revelations before I submit this as a bug?
(Unity iPhone Basic 1.5.1)
Cheers
Update:
Attaching the quads to a rotating empty GameObject, the Draw Calls and Batch count goes up and down. Unity is re-calculating the batching on the fly (note: it only does this after I’ve moved the objects, thus breaking the batching).
I’ve seen several disagreements over whether Unity batches objects within a spacial proximity, but that still shouldn’t be what I’m seeing, since the parent is doing the moving, not the objects themselves (so they’re always in the same proximity).
Would anyone from UT like to share more details on the expected behaviour of Dynamic Batching?