I thought I understood the process for this already but doesn’t seem to be working:
How to set ‘isVisible = false’ for the container of everything in the following playground?
I tried "polytescontainer.isVislble = false’, and also “polytescontainer.rootContainer.isVisible = false” but neither one will clear the mesh. Using “polytescontainer” i can move the entire container so it seems I should be able to clear it too.
Any solutions are welcome.
polytescontainer is just a parent mesh (could be also a parent Transform node), not a real Babylon container as described here - Asset Containers | Babylon.js Documentation
Being the parent mesh it contains all child meshes as array. To get all children and make something with all of them there is a function
Example - https://playground.babylonjs.com/#6H2DXU#7
polytescontainer.getChildren().forEach ((element) => element.setEnabled(false))
Ok that works perfectly, thank you. I’ll look more carefully at the code to see the differences.