Mate just go with me on this. If you need me to spell it out, I mean the first include after the header file, as the error tells you.
Where did you get this idea that it’s not a good idea to include a PCH? Including a PCH decreases build times, sometimes by a factor of minutes. Regardless, think about concentrating on optimising compilation times after you have your build working. You should be including the PCH from every single definition file (and if you don’t you will have to include things again and again.)
This the de facto way of working not only in UE4 but in any C++ project on a commercial team. It will also fix your problem!
Getting Passive aggressive at me dosent help me ether. I didnt remove the PCH i literally just created the class. Ask ue4 why it deleted the file. Including the MyProject.h file after the class.h file changes nothing. It still tells me that it dosent know what component / ugameplaystatics is
I’m terribly sorry if I’ve come across as aggressive Gunschlinger, that was not the intention at all; I’m simply trying to emphasise the point that you’ve been misinformed. You asked why you need to include every single file, the answer is technically you don’t - include PCH, Engine.h in your PCH. Nachtmahr also offered an helpful alternative perspective on the challenge.
Whoops forgot to “In the PCH header include Engine.h or EngineMinimal.h” that fixed it. Weird that ue4 dosent include these by default