Jump to content

Question about asset loading


turnA
 Share

Recommended Posts

Hi there,

Can I load several different assets at a different moment inside the same scene?
I ask since I seem can't trigger preload function again (which will load different asset every time) even if I visit a scene repeatedly. 
I'm using scene switch btw.

Any help will be greatly appreciated.
Thanks.

Link to comment
Share on other sites

I believe you need to load the assets when the scene starts. You can create objects whenever you like, but the assets need to be loaded first.

If you want to load the same scene with different assets, you could pass data to the scene when you start it, and use that data to define which assets to load.

An example of passing data to a scene can be found here https://labs.phaser.io/edit.html?src=src\scenes\passing data to a scene.js

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...