Cannot include WidgetComponent.h

Hi!

I’m trying to include WidgetComponent.h file but I can’t, I added “UMG” to Build dependences

PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "Json", "JsonUtilities", "HTTP", "RHI", "RenderCore", "UMG" });

But still I can’t include the file.

Thanks!

I works without doing anything, I don’t know why…

You need to use this command after adding the “UMG” into your build file:

#include "Components/WidgetComponent.h"