Multiple scenes with separate preloading

I’m making an image-heavy app and want to have multiple scenes. The tutorials and examples I found all have only one preload function of the first scene that load all the resources for all the scenes. Is there a way to have a separate preloading function for each scene, and have the preloading function of one scene called while another scene is being play out?

1 Like

class startScene extends Phaser.Scene{
constructor(){
super({key:‘startScene’})
}
preload (){
},
create(){
}
}

repeat the class code to make new scenes with different stuff you want to preload into it

this should work but if theres anything that you would like to use between scenes have a variable for it outside the scenes

You can use as many preload() calls as you need (one per scene). They’re all run separately. Any scene that’s started will start its loader.