[SOLVED] Hide/Show batched model

Was working on some optimizations recently and need an advice on a proper way of hiding a batched model, without removing it from the scene hierarchy. The models are part of a dynamic batch group, but hiding a model doesn’t seem to have an effect, even if I mark the group as dirty for the next frame.

Hi @LeXXik,

You can call an internal API to do that, that’s the same being called when a model component is disabled.

So the entity will remain in the hierarchy, but any batches referenced will be removed from the batcher.

1 Like

Thanks, @Leonidas!
I actually haven’t tried to remove the model from the batch group. After looking at the sources, it would seem that it should have the same effect as if I would just mark the group as dirty. I then found that instead of sending a group ID, I was sending a group object to be marked dirty. That was why the changes were not taking effect. It works normally by simply marking group as dirty. Its just me not using API correctly :slight_smile: Thanks, marking as solved.

1 Like