I want to load assets of selected scene

Hi,
I want to load assets of selected scene. How can I do that? Right now it is loading assets for whole game.

Hi @Hassan_Amjad1,

Assets are always project wide. A scene is only a collection of entities.

You will need to add a system of yours to find and load only the required assets e.g. tag them and then use a script to findByTag and load them when the scene is loading.

is there any example for that? Should I turn off preload for all assets and then load them by tag?

Yes, that’s a common strategy, turn off preload on all and use findByTag to load them.

You can read more here on how that can be handled and an example is included too:

https://developer.playcanvas.com/en/user-manual/packs/loading-scenes/#managing-assets-in-scenes