Download

Do I Have To Incldue The Specific Header After Including The UMG Module?

Hi community,

As the topic described, I wonder if I need to include the specific header after I already added UMG module in PrivateDependencyModuleNames of *.Build.cs.

I found that Engine module is included by default, and everytime when I create a new C++ class, I don’t have to include engine/world.h in order to use some function like GetWorld().

So I’m not sure if it’s due to including the Engine module in *.Build.cs. And for best practice, do I still need to include Engine/World.h if I want to use GetWorld() in my new C++?

A lot of core headers are in the CoreMinimal.h that should be included in the header of file of all your classes. It has nothing to do with the module per say.