- Home /
Can "StaticBatchingUtility.Combine" use the 32-bit mesh Index Format?
Hello everyone!
I have a scene which has a lot of meshes. All of them has the 32-bit Index Format (configured in the Import settings).
I want to combine all of them into the one mesh using StaticBatchingUtility.Combine. So that I can get only one draw call.
As far as we know Unity now is supporting the 32-bit mesh Index Format, but looks like the StaticBatchingUtility.Combine utility is using the 16-bit mesh Index Format even if meshes are 32-bit.
In my case after calling the combine function I can see that there are several combined meshes with 63k verts, but I'm expecting to see one big mesh (like it should be with 32-bit mesh Index Format).
So, the question is: Can "StaticBatchingUtility.Combine" use the 32-bit mesh Index Format so that I can combine a huge scene into the one draw call?
Have you ever found out the solution? Could it work with unity default static batching?
Answer by Eno-Khaon · Nov 17, 2020 at 06:16 AM
To borrow a quote from Unity's Draw call batching documentation (as of version 2019.4):
Batch limits are 64k vertices and 64k indices on most platforms
With this in mind, it's highly doubtful that 32-bit index meshes would be taken into consideration for batching, since that's the 16-bit limit to begin with.
Thank you for sharing this one! Sad to know we have this limitation.