Normally to regenerate the files that are named like
"MyClass.generated.h" in the \Intermediate directory, I right-click on the main .uproject file and select “Generate Visual Studio Files”. I do this because on occasion the \Intermediate directory will become stale and I simply trash it (along with the \Binaries folder, of course).
This works fine for the main project, but for plugins it’s pretty hit-and-miss. And the hard part is, even if I just add a new class to my plugin and need to generate the
"MyClass.generated.h" file the first time, sometimes it won’t work. And without that generated header, the whole project will not compile.
Is there a solid fix for this? Or even better, is there a way to manually use the UnrealHeaderTool from the command line to regenerate the \Intermediate directory? I have been trying every combination of flags I can think of on
C:\Program Files\Rocket\Engine\Binaries\Win64\UnrealHeaderTool.exe while in my project’s plugin directory, including passing it my
.Build.cs and Public project header.
REQUEST: It would be great to have some documentation on the UnrealHeaderTool (or at least a
--help flag for it).
But more pressing, why does the “Generate Visual Studio Files” not also regenerate Plugin \Intermediate folders?