Hi guys,
I’m building a project that fetches results from an API, and then displays different environments depending of said results. Each environment is an entity composed of different models and entities, but are all built around the same base.
For instance :
Also, the number of environements will grow considerably over time. The issue with the current way I do things is that every single asset is downloaded by PlayCanvas before initialization. That’s going to make the project really heavy, and long to download.
Making a different project for each environement is not an option as it’s a serious hassle for both maintenance and new features that need to be shared. I thought about making a different scene for each environment and then switching programmatically between them, but the issue stays the same, everything is downloaded before the app is ready. Using scenes has the advantage of allowing me to duplicate the base scene to create the new environements, but does not help me when it comes to adding new shared features, that will have to be duplicated over all environements.
So my question is : is there a way to load the assets specific to an entity only when the entity is enabled, even if that means showing a loader or transition in the mean time ?
If you have another solution I’m more than happy to try it too !