turnA 21 Posted July 27, 2018 Report Share Posted July 27, 2018 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. Quote Link to post Share on other sites
fazz 2 Posted July 27, 2018 Report Share Posted July 27, 2018 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 turnA 1 Quote Link to post Share on other sites
Tom Atom 269 Posted July 27, 2018 Report Share Posted July 27, 2018 Hi, you can load assets outside preload method. Look at this example: http://labs.phaser.io/edit.html?src=src\loader\loader%20events\start%20loader%20manually.js turnA and fazz 2 Quote Link to post Share on other sites
turnA 21 Posted July 27, 2018 Author Report Share Posted July 27, 2018 32 minutes ago, Tom Atom said: Hi, you can load assets outside preload method. Look at this example: http://labs.phaser.io/edit.html?src=src\loader\loader%20events\start%20loader%20manually.js This is exactly what I mean! Thanks for the help! ^^ Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.