Hey all -
I’m trying to load a scene from another scene. I’m using the following logic:
this.entity.button.on('click', (e) => {
var oldHierarchy = this.app.root.findByName('Game');
// What happens when this button is clicked?
this.app.scenes.loadScene("13280.json", () => {
oldHierarchy.enabled = false;
});
}, this);
The new scene loads, and the old one does indeed disappear, but none of the initialize
functions are being fired on the newly loaded scene. For example, on the root
object of my new scene, I have attached a script file. In that file, there’s a console.log
in initalize
that never gets called; yet the console.log
that I have in update
does get called.
What am I missing?
Thanks much-