Download

Problem adding code to engine project/header generation not working

I’m making a first attempt at an engine modification and have run into a strange problem right away.
I’ve forked the engine repo and built it no problem, but had an issue adding new source files to the VS project. I created a cpp and h file within the directory structure of the module I want to work with and added them in the appropriate place through Solution Explorer. When I hit build, VS just said the solution was up to date. The files also didn’t seem to want to stay added to the project between reloads either.

I seem to have fixed that by running GenerateProjectFiles.bat again - but should it really be necessary to do this every time I want to add a source file?
Even so, while it does now attempt to compile the new file, it fails at the point I include the generated header, saying it can’t find the file. Presumably this means the Unreal Header Tool isn’t being run on my new source files?

Any ideas?

Okay so as far as I can see, adding a new header file to the ‘Classes’ subdirectory is not enough to trigger Unreal Header Tool on the next build. The only way I’ve found to force it to run is to modify an existing header file, save, change it back, then recompile. Then UHT runs, reparses the modified header and also finds and parses the new one.

What am I missing here? Presumably there must be a saner way to let it know that UHT needs to be run.