Download

C++ Widgets

I have a Blueprint widget with the UI already setup and i want to display that on screen when i hit the ‘F’ key. I have got this from following this wiki.unrealengine.com/UMG,_Referencing_UMG_Widgets_in_Code but im not sure why it keeps saying my class is not found. Its because i haven’t got a c++ class called that im guessing but im trying to use my existing Widget without having to remake it all in c++ I have also included them 3 words into my build.cs as well

0fe344762fdf1814e624236214665389.png3c68a4222c6365db692505b63876929a.pngceef47fbb5fe20508ef126521b7acc85.png

Simply replace “UPickupNotification” with “UUserWidget” (make sure it’s included) and you should be done. Keep in mind that you’ll still need to assign the UI to use to wMainMenu.

I put that in and the compile fails and gives a lot of errors 4887f0c7bde74b69a644dbae5187eb4d11ddc319.png

Ah that’s right. I’ve had this problem before as well. Including UserWidget.h was not enough although I’m not entirely certain which ones you’re missing.
For now you could try to #include “UMG.h” as well as #include “SlateCore.h” and #include “SlateBasics.h”/#include “SlateExtra.h” to see if that fixes it. This will include a lot more than what you actually need so you should then ideally figure out which ones were missing specifically and only include those.

i have #included them all and still getting the error

UMG,_Referencing_UMG_Widgets_in_Code

#include “Blueprint/UserWidget.h”

I used this when I started widgeting.