s4m_ur4i Posted October 7, 2018 Share Posted October 7, 2018 Uncaught TypeError: Cannot read property 'sys' of undefined When I add the scene to the games config. It works perfectly. But when I add a scene via a running the current scene to start it a bit later, I get the error. The error is caused by adding a Scene via the Scene Manager (code below). This scene does exist with the gives name etc. doublechecked. Does anyone know what I am doing wrong? // adds a scene but throwing the error: sys of undefined. this.scene.add('name'); // adds a scene but throwing the error: sys of undefined too this.scene.add(ClassName); cheers, Link to comment Share on other sites More sharing options...
s4m_ur4i Posted October 7, 2018 Author Share Posted October 7, 2018 Solved: Was missing that I had to provide a key and the scene (obvious..) this.scene.add('name', ClassName); https://photonstorm.github.io/phaser3-docs/Phaser.Scenes.ScenePlugin.html#add__anchor Link to comment Share on other sites More sharing options...
Recommended Posts