Why is "UUserWidget is not a type name" when I try to declare the variable?
Every where Ive looked has told me to declare it like so:
But when I do I get an Intellisense error stating "UUserWidget is not a type name"
If I declare it like so:
It suddenly becomes fine with UUserWidget, but instead flags MyMainMenu with "incomplete type is not allowed"
How do I properly declare a UUserWidget ?
asked Mar 22 '15 at 06:39 PM in C++ Programming
At first I though it was a simple "did you include UserWidget.h but it's not only that.
the fix is quick though, just add UMG to the build dependencies and add a few header to your project.
Here's the tutorial that will give you the correct ones, just tried it and got it to work withing 2 minutes
answered Mar 22 '15 at 07:26 PM
Bit of a late reply but I ran into this problem.. Needed to add UMG, Slate and SlateCore to the public dependencies in the build file, check out: https://wiki.unrealengine.com/UMG,_Referencing_UMG_Widgets_in_Code
answered Mar 20 '17 at 01:40 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here