I can’t figure out what I’m doing wrong… I’m using UE4 4.8.3, and have also tried in 4.8.1, with VS 2013 Professional edition.
It seems no matter which #includes or dependencies I add to my project, I can’t get it to compile anything referencing UMG/widgets.
Steps taken:
Create a new, empty C++ FPS project (no starter content)
Click “File->New C++ Class” and create a new class which derives from UWidgetBlueprint (or UUserWidget, etc)
Open project solution in Visual Studio
As per THESE instructions, in the header for the new class, add the appropriate includes
Also from the same instructions, in the *.build.cs file, add UMG, Slate and SlateCore to public dependencies
Rebuild project
This gives me more than 250 compile errors, all centered around missing headers & definitions from UMG and Slate.
So how can I get UUserWidget or UWidgetBlueprint to compile in a C++ project? What steps am I missing?
In a state of desperation, I have even tried shifting around some of the public dependencies into private dependencies, yet to no avail.
I have also tried redownloading and installing UE4 4.8.x, and I still get the same results.
Thanks, it was useful but I discovered the real issue…
After changing my project header to include “Engine.h” (instead of the default “EngineMinimal.h”), it compiled without any errors.