# GUI.AdvancedDynamicTexture.CreateForMesh makes my mesh invisible?

**URL:** <https://forum.babylonjs.com/t/gui-advanceddynamictexture-createformesh-makes-my-mesh-invisible/28944>\
**Category:** Questions\
**Created:** [March 31, 2022, 11:13pm UTC](https://forum.babylonjs.com/t/gui-advanceddynamictexture-createformesh-makes-my-mesh-invisible/28944 "2022-03-31T23:13:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cmexxx](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cmexxx/32/23494_2.png) [@Cmexxx](https://forum.babylonjs.com/u/Cmexxx)\
**Post date:** [March 31, 2022, 11:13pm UTC](https://forum.babylonjs.com/t/gui-advanceddynamictexture-createformesh-makes-my-mesh-invisible/28944/1 "2022-03-31T23:13:43Z")

</div>

I’ve tried to create a block with number.  
I’ve seen this example [https://playground.babylonjs.com/#ZI9AK7#2103](https://playground.babylonjs.com/#ZI9AK7#2103)  
But in my code it doesn’t work  
I can’t see it in the scene

```
    let plane = MeshBuilder.CreateBox("plane",{size: 2}, this.scene);
    plane.position.y = 2;
    plane.rotate(new Vector3(1,0,0), 1.57);

    let advancedTexture = GUI.AdvancedDynamicTexture.CreateForMesh(plane, 1024, 1024);

    var button1 = GUI.Button.CreateSimpleButton("but1", "Click Me");
    button1.background = 'green';
    advancedTexture.addControl(button1);
```

---

<div class="post-metadata">

**Author:** ![Dad72](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dad72/32/13_2.png) [@Dad72](https://forum.babylonjs.com/u/Dad72)\
**Post date:** [March 31, 2022, 11:43pm UTC](https://forum.babylonjs.com/t/gui-advanceddynamictexture-createformesh-makes-my-mesh-invisible/28944/2 "2022-03-31T23:43:37Z")

</div>

Hi,  
works here:

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

In your code you forgot BABYLON.\*

---

<div class="post-metadata">

**Author:** ![Cmexxx](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cmexxx/32/23494_2.png) [@Cmexxx](https://forum.babylonjs.com/u/Cmexxx)\
**Post date:** [April 1, 2022, 7:22am UTC](https://forum.babylonjs.com/t/gui-advanceddynamictexture-createformesh-makes-my-mesh-invisible/28944/3 "2022-04-01T07:22:31Z")

</div>

I added BABYLON before all meshes, cameras, engine etc…  
Now I have `Uncaught TypeError: BABYLON.Engine is not a constructor `

---

<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 1, 2022, 1:37pm UTC](https://forum.babylonjs.com/t/gui-advanceddynamictexture-createformesh-makes-my-mesh-invisible/28944/4 "2022-04-01T13:37:37Z")

</div>

Do you reference the babylon library in your page ? and if so how ?

---

<div class="post-metadata">

**Author:** ![Cmexxx](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cmexxx/32/23494_2.png) [@Cmexxx](https://forum.babylonjs.com/u/Cmexxx)\
**Post date:** [April 2, 2022, 7:57am UTC](https://forum.babylonjs.com/t/gui-advanceddynamictexture-createformesh-makes-my-mesh-invisible/28944/5 "2022-04-02T07:57:10Z")

</div>

So the problem was in the way how I import modules, Project set up guide suggested to import from `babylonjs/core` [Getting Set Up | Babylon.js Documentation](https://doc.babylonjs.com/guidedLearning/createAGame/gettingSetUp).  
I replaced it with `babylonjs` and everything works correctly.
