diff --git a/src/scene/SceneManager.js b/src/scene/SceneManager.js index 5204a728b..eec8be0a2 100644 --- a/src/scene/SceneManager.js +++ b/src/scene/SceneManager.js @@ -180,7 +180,7 @@ var SceneManager = new Class({ { entry = this._start[i]; - this.start(entry); + this.start(entry, entry.scene.data); } this._start.length = 0; @@ -219,7 +219,7 @@ var SceneManager = new Class({ { entry = this._start[i]; - this.start(entry); + this.start(entry, entry.scene.data); } // Clear the pending lists @@ -309,7 +309,7 @@ var SceneManager = new Class({ { if (this.game.isBooted) { - this.start(key); + this.start(key, newScene.sys.settings.data); } else { @@ -697,6 +697,11 @@ var SceneManager = new Class({ } } + if (sceneConfig.hasOwnProperty('data')) + { + newScene.data = sceneConfig.data; + } + return newScene; }, @@ -953,7 +958,7 @@ var SceneManager = new Class({ if (entry.key === key) { entry.autoStart = true; - entry.data = data; + entry.scene.data = data; } }