StaticBatchingUtility.Combine methods are very limiting.

It’s great that we have the StaticBatchingUtility.Combine methods as they gives us more control in cases where simply enabling the static batching flag is not enough. Unfortunately, the API is very restrictive and makes assumptions about the developer’s workflow. Specifically, both methods will recursively search all game objects for attached renderers leaving no option to exclude a renderer attached to a child game object.
It would be great to have a method where we could disable this recursion.

Nevermind. StaticBatchingUtility.Combine(GameObject[ ] gos, GameObject staticBatchRoot); does not recursively search game objects, I just had a bug in my code that made it look that way.

1 Like

Thanks for coming back to clarify. Glad you got it sorted!

1 Like