Projects trigger engine rebuild

I have a source build of Unreal Engine and multiple different projects that use that source build. While using UE4.xx this has never been an issue.

I’ve somewhat recently upgraded some projects to UE5.1 though, still with the same setup where I have one source build of the engine and multiple projects using that.

The problem I’m having is that every time I go into a specific project and try to build, it also triggers a full rebuild of the engine as well. It will then work fine to rebuild that project without trigger an engine rebuild, until I try to build another project and that in turn triggers a full engine rebuild.

I have never had any issues like this in UE4 and as far as I can tell I have not changed anything in how the projects are set up. I’m not sure how something project specific triggers the engine source to have to rebuild as well so if anyone have an idea about what I might have done that would be greatly appreciated.

Thanks!

Are you changing engine code ofter enough? Lets say, at least once in a month? Or are you fine with setting up engine source once and not touching it for a year?

If so, i’d suggest looking into making an installed build instead of source-build.

The idea of installed build is to be build from sources once and using only binaries after. You still can view source for reference purposes, but won’t be able to rebuild engine without explicitely starting another installed build again.

1 Like

Thanks for the response.

I was mostly curious about what might trigger the change in behavior or what mistake I could have made with the setup since I can’t see how any specific project would affect the engine source to trigger a rebuild for other projects.

I have done some minor engine changes in the past but right now most project just use the default 5.1 engine version and so I have just swapped to linking to the prebuilt binaries instead of building the engine myself.

I have same problem

Did you have any solution to this?
This would trigger even I closed other project after I opened them

I think you saved my life here.

I’m using Linux so I did this:

{inside Batch folder} sh RunUAT.sh BuildGraph -target=“Make Installed Build Linux” -script=“{folder}/InstalledEngineBuild.xml” -clean -set:WithDDC=false -set:WithFullDebugInfo=true

I kinda cancelled that and edited the xml, feels safer. My understand, if I did understand, is that an engine is going to be built for me in a folder. I checked the Build.sh and there’s an IF statement checking it a .txt exists, so it does not run a UBT / SCW. I think this is a better solution before understanding why my project is triggering engine re-build.

I did not change anything inside the engine source, but I edited my project editor .ini to load custom classes. Does it trigger engine editor re-build?

So, I gonna need to edit my .uproject and set the ID of the installed engine there and replace all my paths inside the project to the installed build. Did I miss something?

It would be nice if Epic engineers could found some time to document this stuff better for Linux.

Edit: Every time I build the engine, I spent 3-4 hours, so yeah, help is appreciated.

1 Like

Can’t say what exactly is triggering rebuild in OP’s question, since i skipped this question and went for installed build from the start. Still updating it once or twice per year, when i updating an engine version or need to fix something there.

So, I gonna need to edit my .uproject and set the ID of the installed engine there and replace all my paths inside the project to the installed build. Did I miss something?

First, fyi, at 5.3+, you can set id during build with the -set:BuildIdOverride=MyCustomStringId , to make it static, not the random guid that changes from build to build.

For installed build you need to set id in *.uproject (btw, on windows there is an “switch engine version” under RMB that does this for you); I don’t remember doing anything about paths inside of project, so probably doesn’t need it. Only outside of project if you have some external building pipelines set up.

You also need to… idk about linux, so i’ll describe what i’m doing on windows:
On windows it’s “to register engine in registry”, so the UnrealVersionSelector.exe (UVS is the default associated app for *.uproject files, comes with EpicGamesLauncher installation) can make association between your engine id and its executable. This can be done by launching the UnrealEditor.exe(or whatever your editor executable is called) once from engine’s folder; Or by learning what and where should be registred.

Edit: Every time I build the engine, I spent 3-4 hours, so yeah, help is appreciated.

Not sure if you talking about inital problem or tuning the installed build, but my engine is built with -set:WithFullDebugInfo=false. I don’t remember what this is responsible for, but irrc it increase the build time\size drastically. But even without it the debug symbols will still be present.

Droping -clean is also an option, if you building engine from the same folder serveral times with almost the same settings.

Can also suggest to take a look at the following options:

//The options set possible target platforms for game packaging:
// I don't remember their default values, so i recommend to check content of `InstalledEngineBuild.xml`
// If they are enabled by default, then disabling will improve build speed\\size
-set:WithWin64=true
-set:WithMac=false
-set:WithAndroid=false
-set:WithIOS=false
-set:WithTVOS=false
-set:WithLinux=true
-set:WithLinuxArm64=false
-set:WithHoloLens=false

//or shortcuts to disable all of them besides the host-platform as target
-set:HostPlatformEditorOnly=true  // for build that will be distributed among designers: no package-game capabilties, minimum unneeded stuff
-set:HostPlatformOnly=true `// same, host-platform only, but with building capabilities

All good, installed build is working like a charm. Too good to be honest, while the source folder can reach 200GB, installed build stays at 50GB. Problem was disk fault.

I followed the same steps, just edited the .xml directly. Just changed the hosting only option to true and disabled DDC.