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
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.
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
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)