What's the header file to make the pointer to GEngine work?

I usually compile the engine from GitHub, but I decided to give it a shot with 4.4 and found out that’s all my efforts to make GEngine point to something fails. You know, as in

GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Green, TEXT("Hit"));

What’s the correct header for it ?

Answering my own question. It’s

  #include "Engine.h"

:stuck_out_tongue:

It doesnt work for me :frowning:

Care to share your code and the output it produces ?

Its just a blank plugin.

Newest updated answer as pointed out by drichardson below.

#include Engine/Engine.h

Disregard what is written below the line, as it is an old answer.


Updated answer as of 4.21:

#include "Runtime/Engine/Classes/Engine/Engine.h"

According to the IWYU (include what you use) page, you’re supposed to include “Engine/Engine.h” for the new streamlined header. While both the include you gave and “Engine/Engine.h” work now, you’re probably better protected from future changes in file location by using “Engine/Engine.h” since the module owner could move the file around without breaking anyone.

Good point, thanks. Updated answer.