# How to get MeshByName from assetContainer

**URL:** <https://forum.babylonjs.com/t/how-to-get-meshbyname-from-assetcontainer/20061>\
**Category:** Questions\
**Tags:** material\
**Created:** [April 16, 2021, 11:47am UTC](https://forum.babylonjs.com/t/how-to-get-meshbyname-from-assetcontainer/20061 "2021-04-16T11:47:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krishna\_Kishore](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/krishna_kishore/32/3682_2.png) [@Krishna\_Kishore](https://forum.babylonjs.com/u/Krishna_Kishore)\
**Post date:** [April 16, 2021, 11:47am UTC](https://forum.babylonjs.com/t/how-to-get-meshbyname-from-assetcontainer/20061/1 "2021-04-16T11:47:30Z")

</div>

I have loaded all glbs into on conatiner the LoadAssetContainer, now i want to few meshes by name to the scene

how to query assetContainer Meshes by name

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [April 16, 2021, 12:00pm UTC](https://forum.babylonjs.com/t/how-to-get-meshbyname-from-assetcontainer/20061/2 "2021-04-16T12:00:21Z")

</div>

There are no functions to do that as the goal is to instantiate in a scene before manipulations.

You could nevertheless probably do it through the asset container .meshes array

---

<div class="post-metadata">

**Author:** ![Krishna\_Kishore](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/krishna_kishore/32/3682_2.png) [@Krishna\_Kishore](https://forum.babylonjs.com/u/Krishna_Kishore)\
**Post date:** [April 16, 2021, 12:17pm UTC](https://forum.babylonjs.com/t/how-to-get-meshbyname-from-assetcontainer/20061/3 "2021-04-16T12:17:36Z")

</div>

here is my scenarios, please guide what is the approach

i have set of glb, i would like to add to container with out adding to scene, based on the config i want to add some of meshes to the scene. please let me know how to do it

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [April 16, 2021, 1:05pm UTC](https://forum.babylonjs.com/t/how-to-get-meshbyname-from-assetcontainer/20061/4 "2021-04-16T13:05:38Z")

</div>

So you load them all separately with loadAssetContainerAsync which gives you a set of assetContainers on per glb and then you use the one you need to add to your scene.

---

<div class="post-metadata">

**Author:** ![Krishna\_Kishore](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/krishna_kishore/32/3682_2.png) [@Krishna\_Kishore](https://forum.babylonjs.com/u/Krishna_Kishore)\
**Post date:** [April 16, 2021, 1:17pm UTC](https://forum.babylonjs.com/t/how-to-get-meshbyname-from-assetcontainer/20061/5 "2021-04-16T13:17:54Z")

</div>

How to pick a mesh from container to add to scene,

let entries = container.instantiateModelsToScene(); is working

but when i do scene.addMesh("") is not working

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [April 16, 2021, 2:02pm UTC](https://forum.babylonjs.com/t/how-to-get-meshbyname-from-assetcontainer/20061/6 "2021-04-16T14:02:51Z")

</div>

Yup you should use instantiateModelsToScene or addAllToScene, and not try to manually do it.

---

<div class="post-metadata">

**Author:** ![Krishna\_Kishore](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/krishna_kishore/32/3682_2.png) [@Krishna\_Kishore](https://forum.babylonjs.com/u/Krishna_Kishore)\
**Post date:** [April 16, 2021, 2:51pm UTC](https://forum.babylonjs.com/t/how-to-get-meshbyname-from-assetcontainer/20061/7 "2021-04-16T14:51:55Z")

</div>

when i call instantiateModelsToScene , it is add all the meshes, i need to add few meshes only in the container

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [April 16, 2021, 3:20pm UTC](https://forum.babylonjs.com/t/how-to-get-meshbyname-from-assetcontainer/20061/8 "2021-04-16T15:20:23Z")

</div>

Yup it would be all of them, as it is hard to keep track of all the relation ships and so on. But is is still scoped to only one glb
