# Scene config is not saved/updated. help

**URL:** <https://phaser.discourse.group/t/scene-config-is-not-saved-updated-help/2224>\
**Category:** Phaser 3\
**Created:** [April 24, 2019, 12:56am UTC](https://phaser.discourse.group/t/scene-config-is-not-saved-updated-help/2224 "2019-04-24T00:56:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![RedPS](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@RedPS](https://phaser.discourse.group/u/RedPS)\
**Post date:** [April 24, 2019, 12:56am UTC](https://phaser.discourse.group/t/scene-config-is-not-saved-updated-help/2224/1 "2019-04-24T00:56:31Z")

</div>

```
let game = new Phaser.Game({
width: 720,
height: 1280,
scale: {
    mode: Phaser.Scale.FIT,
    autoCenter: Phaser.Scale.CENTER_BOTH
},
autoRound: false,
scene: [
    load_scene ,menu_scene,playgame_scene
]   
})

```

my load\_scene is not load, but my menu\_scene is and , i’ve set active: false in menu\_scene like below and active true on load scene before it works fine but now idk why it happens my load scene load textures, atlases and musics

```
import { CST } from "../CST.js";
export class menu_scene extends Phaser.Scene{
	constructor(){
		super({
      key: CST.SCENES.MENU,
      active: false
		})
  }

```

^ im not copying the whole code just snippet.

yesterday it works fine but today, unfortunately. i thought it was parcel at first so i tried to reparcel and even tried reinstall

---

<div class="post-metadata">

**Author:** ![RedPS](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@RedPS](https://phaser.discourse.group/u/RedPS)\
**Post date:** [April 24, 2019, 4:58am UTC](https://phaser.discourse.group/t/scene-config-is-not-saved-updated-help/2224/2 "2019-04-24T04:58:53Z")

</div>

Somehow, both my menu scene and load scene key is changed to “default”, even after i change the key manually

---

<div class="post-metadata">

**Author:** ![Telinc1](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/telinc1/32/60_2.png) [@Telinc1](https://phaser.discourse.group/u/Telinc1)\
**Post date:** [April 24, 2019, 6:07am UTC](https://phaser.discourse.group/t/scene-config-is-not-saved-updated-help/2224/3 "2019-04-24T06:07:28Z")

</div>

What do you get if you `console.log(CST.SCENES.MENU);` from your Scene’s constructor? If you’re referencing it incorrectly, the Scene’s key would be `undefined` and it’s fall back to a default value.

---

<div class="post-metadata">

**Author:** ![RedPS](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@RedPS](https://phaser.discourse.group/u/RedPS)\
**Post date:** [April 24, 2019, 6:13am UTC](https://phaser.discourse.group/t/scene-config-is-not-saved-updated-help/2224/4 "2019-04-24T06:13:15Z")

</div>

when i console.log, it is referenced correctly i got MENU and to my surprise i got LOAD which i console.log on my load scene constructor  
edit 1: but the both scenes key is default  
edit 2: however on load scene, I did console.log on init, which doesn’t appear(as if its skipped)  
edit 3: the play scene key is the only one not default and is correct

---

<div class="post-metadata">

**Author:** ![RedPS](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@RedPS](https://phaser.discourse.group/u/RedPS)\
**Post date:** [April 24, 2019, 6:27am UTC](https://phaser.discourse.group/t/scene-config-is-not-saved-updated-help/2224/5 "2019-04-24T06:27:17Z")

</div>

Ive even changed browser to edge and switched to wamp(blank screen)  
tried converting .js to .ts, renaming the scene file to remove \_

I even named the scene key to “MENU” and “LOAD” instead of referencing it form CST file.  
the scene key still changed to default

my load scene is supposed to load textures, atlas and sounds for my menu scene  
below is the code

```
import { CST } from "../CST";

export class LoadScene extends Phaser.Scene{
	constructor() {
		console.log(CST.SCENES.LOAD)
		super({
			key: CST.SCENES.LOAD, 
			active: true
		})
	}
init(){
	console.log("load accessed");
}

preload(){
	this.load.image("bg", "assets/art/background.png");
	this.load.path = 'assets/art/';
	this.load.atlas('buttonAtlas',"ui_buttons.png",'ui_buttons_atlas.json');
	this.load.atlas("blockAtlas", "blocks.png", "blocks_atlas.json");
	
	this.load.path = 'assets/sounds/'
	this.load.audio("bgm", "bgm.wav");
	let loadingBar = this.add.graphics({
		fillStyle : {
			color : 255
		}
	});
	
	this.load.on("progress", (percent) =>{
		loadingBar.fillRect(0, this.game.renderer.height /2, this.game.renderer.width * percent, 50);
	});
	this.load.on("complete", ()=>{
		this.scene.start(CST.SCENES.MENU);	
	});
	console.log("load accessed1");
	
	
}
create(){
	this.scene.start(CST.SCENES.MENU);
	// this.scene.start(CST.SCENES.MENU)
	console.log("load accessed2");
}

```

}

both console.log in init and create arent shown

---

<div class="post-metadata">

**Author:** ![RedPS](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@RedPS](https://phaser.discourse.group/u/RedPS)\
**Post date:** [April 24, 2019, 11:48am UTC](https://phaser.discourse.group/t/scene-config-is-not-saved-updated-help/2224/6 "2019-04-24T11:48:35Z")

</div>

UPDATE  
after some digging, i found out that my config for the scene is undefined for menu and load scene except for play scene  
below is an example (load scene)

 ![image](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/f/fd4d1604beb06cbbebfab64140bdf1299aa5e173.png)

---

<div class="post-metadata">

**Author:** ![RedPS](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@RedPS](https://phaser.discourse.group/u/RedPS)\
**Post date:** [April 24, 2019, 1:24pm UTC](https://phaser.discourse.group/t/scene-config-is-not-saved-updated-help/2224/7 "2019-04-24T13:24:12Z")

</div>

FIXED/SOLVED  
turns out since i used math import on playgamescene  
i have to do the same for load and menu eventhough it was not used

it took me 12 hrs well 10 excluding some breaks lol for just a missing import! QQ X.X
