I just installed 4.22, and UnrealHeaderTool is being called every time I build, even if it’s just a CPP change or even if there is no change at all. This happens in any project I try, including new projects. I tried both VS 2017 and VS 2019, same result. Is anyone else having the same problem?
Here’s the output from a build with no changes:
1>------ Skipped Build: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------
1>Project not selected to build for this solution configuration
2>------ Build started: Project: Realms, Configuration: Development_Editor x64 ------
2>Parsing headers for RealmsEditor
2> Running UnrealHeaderTool “C:\proj\RealmsUnreal\Realms\Realms.uproject” “C:\proj\RealmsUnreal\Realms\Intermediate\Build\Win64\RealmsEditor\Development\RealmsEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -installed
2>Reflection code generated for RealmsEditor in 8.2522749 seconds
2>Target is up to date
2>Total execution time: 9.38 seconds
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 1 skipped ==========
I was having the same issue. I’ve fixed this by opening the following file in a text editor and saving over itself, giving it a newer last modified timestamp:
I have created a bug report and will let you guys know when I receive a response. I’m hoping this gets fixed soon. Just think of all the time everyone is losing to this simple glitch. I didn’t even know that UHT didn’t have to run every single time, I was waiting 10 seconds extra on every build for months!
No, I used the new reporting system. I got an email saying that they will get back to me when there is a report filed.
To reproduce, just install UE4 from the launcher and compile a new C++ project. It will rerun UHT every time on every file regardless of what has changed.
I did what you said, then selected a “rebuild” build in visual studio code and now it runs only when it needs to. Thank you very much for this, the issue still happens in 4.24
You deserve the title: LEGEND.
This issue has held me back from investing time to learn UE4 for over 2 years now.
But I eventually decided to go through pain of waiting at least 20s for every build.
This fix makes my build times only 2s max. Ground breaking
With this discovery I’ve just falling more in love with UE4.
Thanks, Thanks, Thanks Big time.
I’m using Visual Studio 2019 on Windows, so I don’t have [FONT=Lucida Sans Unicode]UE_4.22\Engine\Binaries\Win64\UnrealHeaderTool.target in my project directory.
I did find this issue Unreal Engine Issues and Bug Tracker (UE-73197), which says the fix was targeted for 4.23. I’m going through the Udemy course and currently using 4.22 so I haven’t tried this with a newer version.