# Question about hiding components

**URL:** <https://forum.babylonjs.com/t/question-about-hiding-components/28350>\
**Category:** Questions\
**Created:** [March 11, 2022, 3:53pm UTC](https://forum.babylonjs.com/t/question-about-hiding-components/28350 "2022-03-11T15:53:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DesG](https://avatars.discourse-cdn.com/v4/letter/d/f9ae1b/32.png) [@DesG](https://forum.babylonjs.com/u/DesG)\
**Post date:** [March 11, 2022, 3:53pm UTC](https://forum.babylonjs.com/t/question-about-hiding-components/28350/1 "2022-03-11T15:53:49Z")

</div>

Hello  
I’ve created a simple gltf file which contains around 1000 scene nodes with each node instancing about 50 meshes - it’s the same 50 meshes for each node with a different matrix applied. This is loaded with a single LoadMeshAsync and renders fine in Bablyon.

Now I really only want one of those 50 meshes to be visible for each node at any one time - the particular mesh visible will vary by node and by user input. How can I achieve this in Babylon? I was thinking I could just use setEnable on the unwanted meshes on each node after loading my gltf but it looks like that only operates at the level of a Babylon mesh not a gltf mesh. The number of combinations is too large to allow a different mesh to be loaded for each one.

Is it possible to edit the root scene directly in javascript. I see many components in the scene object have a isVisible or isEnabled property but so far I’ve had no success with that approach. This seems like a fairly common place thing to do in configurator applications so surely there is a straightforward solution?

Thanks Des

---

<div class="post-metadata">

**Author:** ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Post date:** [March 11, 2022, 4:22pm UTC](https://forum.babylonjs.com/t/question-about-hiding-components/28350/2 "2022-03-11T16:22:42Z")

</div>

> [@DesG](#):
>
> operates at the level of a Babylon mesh not a gltf mesh

It acts on a gltf mesh in this PG

> **[Babylon.js Playground](https://playground.babylonjs.com/#8IMNBM%23476)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

Could you produce a simplified version of your project in a playground, one node with a couple of meshes perhaps.

You might find this useful

> **[Using External Assets In the Playground | Babylon.js Documentation](https://doc.babylonjs.com/toolsAndResources/thePlayground/externalPGAssets)**
>
> Learn how to use external assets in the playground in Babylon.js.

---

<div class="post-metadata">

**Author:** ![DesG](https://avatars.discourse-cdn.com/v4/letter/d/f9ae1b/32.png) [@DesG](https://forum.babylonjs.com/u/DesG)\
**Post date:** [March 11, 2022, 9:58pm UTC](https://forum.babylonjs.com/t/question-about-hiding-components/28350/3 "2022-03-11T21:58:35Z")

</div>

Thanks a lot

In the way of these things, the process of preparing some sample code exposed the (trivial) mistake I was making.

Everything works perfectly now. Just find the parent node in the scene, getChildMeshes() and then setEnabled on the children as appropriate.

Many thanks to all for the help.

Des
