console.log(this.Game.scene)
If I do:
console.log(this.Game.scene.scenes[0])
The returned value is undefined. How can I load the layer? I also cant do:
console.log(this.Game.scene.scenes.get("LayerMap"));
Because I get this.Game.scene.scenes.get is not a function
I’m using this inside a VUE component, don’t know I may be an issue. I’m puzzled because I do can access the Phaser game component.
samme
March 31, 2020, 5:12pm
2
What are you trying to do? Start the game? Start the scene?
GET the scene.
I want to add and empty graphics object.
samme
March 31, 2020, 5:39pm
4
this.Game.scene.getScene("LayerMap")
I get null
when:
console.log(this.Game.scene.getScene("LayerMap"));
If I do:
console.log(this.Game.scene);
In the same code block I did the getScene, I do get something, the SceneManager object. So I do not think is something related with the scope, but I’m no good with JS, in fact, I hate it, lol.
samme
April 1, 2020, 10:14pm
6
Either layerMap
is the wrong key or the layerMap
scene hasn’t been added yet.