We are currently using UGS in our studio to help artists and content creators to work without having to build the editor. The setup we use is based of the documentation from Perforce U (link here), i.e:
- We have a from source version of the engine kept in a perforce stream called engine-mainline.
- This from source version is currently coming from git.
- Our game is stored in a stream game-mainline, which has a mapping to pull in the engine-mainline source.
The folder layout is:
root
|__Engine
|__… (Other folders such as Samples, LocalBuilds etc.)
|__Game
|__ <game source and assets here>
When we build the UGS target, we use the default build graphs from `Engine/Build/Graph/Examples` and the Node `Submit To Perforce For UGS`.
This step appears to require the engine source code to be present in order to build.
We intentionally rarely make changes to the engine source code to make it easier for us to upgrade our game to support new engine verions and therefore shouldn’t have a need to build the engine very often. Furthermore our CI is currently required to sync the engine source code even if no changes are made to the engine on a clean build.
This had us think whether it would be possible to reconfigure our streams and UGS such that:
- We build the engine source code into binaries alone using a dedicated CI pipeline.
- We then upload the binaries to our perforce binaries to an artifact store or perforce stream.
- Note that this would only happen if there are changes to the engine source code.
- When a new change is submitted to the game source code, the CI downloads the engine binaries from the artefact store, use these to build the UGS editor target, and then publish the prebuilt engine binaries, with the UGS editor target binaries, and upload this to the stream in perforce where UGS pulls it pre built binaries from for the new version of the game build.
Note: this is different to the default usecase of PCB for UGS, as rather than building the engine binaries when building the editor target, we only use the prebuilt engine binaries, saving us both in terms of build times, and perforce sync times on our build agents.
We have scanned the documentation, but haven’t been able to find anything indicating that this can be done, however, it seems like something that should be possible to do.
So to the question, can this be done? and if so, what would we have to consider when setting this up from a build graph and UGS perspective?
Hopefully the UGS tool doesn’t necessitate the engine source to be there to build and package for the UGS editor target, but haven’t had the chance to dig deeper into the code to see if there are assumptions built into UGS that would prevent the approach above.
Lastly, has anyone else attempted this in the past?