Remove objects from CombineChildren mesh?

I’m attempting to implement the CombineChildren script for use on an iPhone game.

Is it possible to remove children from the parent object and then call the combine function at runtime on demand?

I’ve tried setting it up so that on Update the script checks the number of children it has, and calls the combine script if it differs from the last frame, but this doesn’t seem to work.

Has anyone managed to do anything like this?

You probably need to do some modifications to use the script like that, because once the script is called, all the MeshRenderers of the children get disabled, and won’t be used again if CombineChildren gets called again.

Also, be aware that calling CombineChildren is not free. If you do it a lot during runtime, the combing may be a significant performance hit by itself. But that is something you’d have to figure out for your particular use case. It really depends on how often the children change.