Hi, I’m pretty new to BabylonJS so it’s very likely that this is on me.
Upon trying to call assetsManager.load(), my browser returns this message:
And looking on the code (minified version formatted), the last reference to the getEngine() function is very early in the code, so idk if the part that’s calling it has access to it or not.
Also, here’s a snippet of my code:
this.assets["menu"] = new BABYLON.AssetsManager(scene);
var background;
this.assets["menu"].addImageTask(background,"./Assets/Menu/background.png").onSuccess = task =>{
background = task.image;
background.x = 0;
background.y = 0;
background.width = window.innerWidth;
background.height = window.innerHeight;
console.log("bg ok!");
};
var playbutton;
this.assets["menu"].addImageTask(playbutton,"./Assets/Menu/playbutton.png").onSuccess = task=>{
playbutton = task.image;
console.log("button ok!");
};
console.log(typeof(this.assets["menu"]));
this.assets["menu"].load();
I’m sorry if it’s something obvious.
Thanks for the help in advance!