4.15 C++ Transition Guide

Ah, finally got it. It turns out I had to explicitly say PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

Edit:

Alright, so that took a while. I had to move my #include “MyGame.h” as the second include for every .cpp file instead of the first. I had a bunch of other issues related to the fact that I had a “MyGameGeneral” log category defined in MyGame.h and now half of my files didn’t see it anymore. The thing is - I now don’t even have CoreMinimal.h included in MyGame.h - it’s a completely empty header file as far as includes go. All I have in it are some #define’s to name some collision channels.

For what it’s wort up until now my game was doing 4 tasks to compile, now it’s doing 3. I never had a bunch of issues with game compile times, I guess I’ll have to test it out a bit more.

Edit 2:

One curious thing I can’t quite figure out regarding the new bEnforceIWYU mode - how do you access GEngine without including Engine.h? I have my own GameplayStatics version and I need GEngine->GetWorldFromContextObject().