Rebuild entire engine after packaging

Hello!

I am using a custom engine built from source with few bug fixes, and every time after I package my project I have to rebuild the entire engine in the Development Editor configuration. This can be very frustrating especially in a situation like now where I started the packaging process, cancelled because I forgot something and now have to wait 30-60 mins for it to compile… Trying to rebuild only the game project in Visual Studio doesn’t work for me.
Is that something that can be avoided or is there no way around it?

Thanks!

Hi Fluppi393,

To get an entire engine rebuild is not the intended workflow. If UnrealBuildTool decides to do a (re-)build, it must of detected some kind of (code or ini file) change. When the rebuild happens, do you see something similar to the following in your VS build output?

2>  Creating makefile for {ProjectName}Editor (working set of source files changed)

Cheers,

Gheist is correct, it shouldn’t require rebuilding the engine in any way unless changes are being made. You mention that you’re forced to do so on Development every time you want to package… How exactly are you going about compiling that starts this? Are you hitting Build > Build Solution at the top of VS or using Ctrl+Shift+B? This option will build everything in the solution explorer and could result in this behavior. I would suggest right-clicking on your project directly and choosing build from the context menu. Also, the editor should actually never need to be built for “Development” and should only require either “Development Editor” or “Debug Editor” for most situations.

Thanks for the quick reply, I may have spoken too soon it is not actually rebuilding the entire engine, but doing this:
1>------ Build started: Project: ShaderCompileWorker, Configuration: Development_Program x64 ------
1> Target is up to date
2>------ Build started: Project: BrickRigs, Configuration: Development_Game x64 ------
2> Performing full C++ include scan (building a new target)
2> Creating makefile for BrickRigs (UnrealBuildTool.exe is newer)
2> Building UnrealHeaderTool…
2> Target is up to date
2> Parsing headers for BrickRigs
2> Running UnrealHeaderTool “D:\Unreal Projects\BrickRigs\BrickRigs.uproject” “D:\Unreal Projects\BrickRigs\Intermediate\Build\Win64\BrickRigs\Development\BrickRigs.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors
2> Reflection code generated for BrickRigs in 27.9298939 seconds
2> Performing 305 actions (4 in parallel)
2> PCH.CoreUObject.h.cpp
2> PCH.Core.h.cpp
2> PCH.EnginePrivate.h.cpp

Sorry I think I am mixing some things up here, I am a bit confused because at times the engine rebuild seems pretty random to me. So here is exactly what happened:
-Built the project in Development Editor
-Started and cancelled packaging
-Changed to Development Game configuration
-Build project by clicking on “Local Windows Debugger” (which should as of my knowledge only build out of date projects)

Then the process as in my post above began, taking about 20-30 minutes.
After that I switched to Development Editor and compiled it without problems, then back to Development Game and had to do the same thing again. I am pretty sure that usually doesn’t happen when switching between these two modes.

For some reason, Visual Studio prompts for building everything involved when you go to launch the editor in debug. If you know that your project is up to date, you can feel free to hit “No” when prompted and no building should occur.

It’s probably not the entire engine but a heavy chunk of it. I think this situation is due to the fact that the C# configuration project ( the one that uses your Project.target.cs) for each module needs to be rebuilt because if you look at the binaries, there’s no Debug/Development version of the DLLs, just a single version, so changing configurations between Debug/Development/Shipping triggers recompilation.

I have the same issue. I have engine from github (5.0.3 release branch) and i builded it with Development Editor Win64 configuration. Then, i opened my game and everything is good untill i start to package it. When i start to package my game, a lot of engine related object files *.obj comes to my game intermediate folder. Additionally this process takes huge amount of time and i can’t understand why it happens. As @Ciprian_Stanciu mentioned above, my engine from source hasn’t object files for Development and other configurations. Only for Development Editor configuration. And may be because of that when i packaging my game, solution can’t find Development Game object files of engine and start to build them.

The question is how to fix it ? because normal engine from launcher working correctly and has prebuilded obj files for Development and Shipping.

1 Like

I’ve been suffering with the same issue now for about a year.

It appears to happen randomly for me. A full rebuild of the UE project fixed the issue for a few weeks, until yesterday, I needed to do a full rebuild of the package due to the process not starting error.

just a couple days prior to that, I had to delete the intermediate folder to clean for another compiler issue, which did trigger a full rebuild (approx 788 files) for that configuration.

The very next build, after resetting to only incremental build, it triggered again, with no code changes since the day before. I only packaged.

EDIT:
To be clear, I don’t think it’s a misunderstanding of the issue at hand, the question is, how can this be detected, preferably prior to a build and is there any possible way to avoid that situation.

1 Like