# A strange one with BABYLON.CubeTexture

**URL:** <https://forum.babylonjs.com/t/a-strange-one-with-babylon-cubetexture/4196>\
**Category:** Bugs\
**Tags:** material\
**Created:** [June 29, 2019, 7:58am UTC](https://forum.babylonjs.com/t/a-strange-one-with-babylon-cubetexture/4196 "2019-06-29T07:58:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ultralowpoly](https://avatars.discourse-cdn.com/v4/letter/u/e9bcb4/32.png) [@ultralowpoly](https://forum.babylonjs.com/u/ultralowpoly)\
**Post date:** [June 29, 2019, 7:58am UTC](https://forum.babylonjs.com/t/a-strange-one-with-babylon-cubetexture/4196/1 "2019-06-29T07:58:08Z")

</div>

Hello, calling the code below from a class other than the class where “scene” was instantiated causes an error even if the reference to game.scene is good:

`let envTexture = new BABYLON.CubeTexture('../assets/skyboxes/, this.game.scene, ["nx.jpg", "ny.jpg", "nz.jpg", "x.jpg", "y.jpg", "z.jpg"], true);`

The Error is cryptic as it has to do with a loader coughing:  
`Uncaught TypeError: Cannot read property 'useDelayedTextureLoading' of undefined`

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 1, 2019, 4:50pm UTC](https://forum.babylonjs.com/t/a-strange-one-with-babylon-cubetexture/4196/2 "2019-07-01T16:50:22Z")

</div>

Hey, without a repro it is impossible to help you ☹
