As I start thinking about implementation architecture for a large project as part of my prototyping, I’m seeing the limitations in the “everything has to be in one project” approach.
Our use-case could quite possibly involve several hundred disparate “scenes” created by different people, one or two or a few of which may be loaded within a sequence at any one time.
So I’m looking for either dynamic loading of scenes (similar to Unity AssetBundles - only way better because they will have code in them! ) or, using the REST publishing API to pull together the individual scenes into published app combinations.
The problem with the latter is, that it still requires everything to be in the same project, whereas I will need to be able to pick scenes from a variety of projects, as handling that much stuff in one project will just be too unwieldy, as well as each developer will want their own environment and asset library - no intermingling until publication.
The only way I can see to do it currently, would be to publish individual scenes as web projects, and then run a post-process step to build a new config.json file and asset tree, which looks probably doable, although we could definitely do with some pointers on the structure of config.json to make sure we don’t miss anything.
Is there a better way, either now, or on the roadmap for the short/medium-term?
It is possible although you would have to develop the framework to handle that yourself. It be worth looking at the engine source directly on GitHub to see how everything is loaded and handled currently.
All the assets including the scenes can be loaded at runtime and don’t have to be package as part of the ‘app’. The files can be hosted on a server somewhere as long as the URL links between assets are correct.
The only exception to this would be the scripts that you create. I can’t remember offhand how the scripts are reference by the entity in the scene JSON files.
Yes, all the scripts for the entire application seem to be referenced up front, which is the one thing that makes me think maybe dynamic loading won’t be so easy. I wonder if any of the team might chime in on that?
The configuration.json file seems to contain the entire application map though, so I am thinking that a post-processing step might enable us to (basically do what PlayCanvas publishing does) but cobbling an application together from various different projects.
But if there’s an official way in the pipeline (or a recommendation in terms of implementation design from PC) then maybe it’s something that I could investigate.