- Home /
Static Batching at Runtime
I've found that activating static batching performs the batching process at build-time, resulting in a massive increase in build size per level (in my case from 400kb to 18MB for a single level).
Is it possible to defer static batching to run-time? Resulting in a smaller compiled project size at the cost of slightly longer level loading?
Note: I am aware of the combine meshes script but it keeps crashing in my tests, I'm still trying to figure this out on my side, so for now I'm just curious about the deferred static batching.
Thanks.
Answer by Kai Wegner · May 17, 2011 at 06:24 AM
Maybe this wil help? http://unity3d.com/support/documentation/ScriptReference/StaticBatchingUtility.Combine.html
Answer by Eric5h5 · Jan 18, 2011 at 10:01 AM
Not that I'm aware of, though it sounds like a reasonable option that could be considered for a future version of Unity, unless there's some technical reason for it other than loading time. The combine meshes script doesn't do what static batching does anyway--for example, static batching works with occlusion culling, whereas the combine meshes script just combines into a single mesh, which doesn't work with occlusion culling.
The only limitation I see with the runtime batching option is that beast might break, with the atlasing and all.
So an exception would be that runtime-batched static objects cannot be beast lit.