Algosyntax Logo

#Include “Engine.h” Monolithic headers should not be used UE5 Warning

We will cover the alternative to using #include “Engine.h” in this tutorial. Whenever you use the global variable GEngine , you might encounter the error “Use of undeclared Identifier GEngine”.

You may then think the solution is to #include “Engine.h” , which works during development but will lead to plugins failing to package with the following warning: ” Monolithic headers should not be used by this module. Please change it to explicitly include the headers it needs “.

The Alternative to "Engine.h"

There are multiple headers that include the definition for GEngine and one of them is the “Runtime\Engine\Public\Engine.h” 

and this is not what we want. 

The header to include in this case is:  #include “Engine/Engine.h”

Don’t get confused by the two, they are not the same although they are both Engine.h. Epic Games explained it better when they introduced their Include What You Use model , or IWYU , which you should read about. In that article they mention the best way to use GEngine under this model.

5/5

Welcome to our audio and rhythm plugins collection! With MidiEngine, you can easily import MIDI files and use midi events to create engaging rhythm gameplay or enhance your videos.

4.5/5

Plugin that helps add UMG Widgets to Level Sequences for Text Layers, Movie Titles, 2D layers and more… directly within sequencer. Cross platform.

5/5

Let your end users Split And Resize The UI at runtime. Perfect for both games and Applications.

Consider investing in some of our plugins. They might save you some time.  Also helps supports these tutorials.

Instantly get access to our plugins like Blender Curves Importer and UMG Cinematics and more when  you support us on Patreon!

 Join Us On Discord For More Daily Tips!