Stupid question: Intellisense can't find GEngine?


I’m new to c++ coding in unreal Engine and I’m trying some very basic stuff to get started such as printing strings. But when I type GEngine intellisense doesn’t seem to recognize it. All I get in the dropdown is GEngineIni

Why is this?

I created a simple actor c++ base class.

You need to include “Engine.h”.

Yeah I just found it myself :slight_smile:

For everyone else having this problem:

Add this to top of your cpp:

#include “Engine/Engine.h”

If you want the monolithic header that includes a boatload of stuff, use “Engine.h” like @ExtraLifeMatt said. If you want to use the more streamlined IWYU header, then use “Engine/Engine.h”. They are actually two different header files. The former includes a lot of other files (slower compile times, but you don’t have to include as much yourself) while the latter uses forward declarations (faster compile times, but you must include files yourself when you need them).

The use of Engine.h is called out specifically in the IWYU link above:

Ok thanks for the information! :wink:

I wasn’t calling out the full path, merely the file name. :slight_smile:

If you actually try to use just “Engine.h”, the compiler will yell at you. “Engine/Engine.h” is the proper include, as you point out.