Add simple progressbar to my C++ HUD

Thanks, adding “SlateBasics.h” fixed all compiler errors.

The tutorial you linked was up2date but had 2 minor mistakes that prevented it from compiling (probably a typo):

#include "StandardSlateWidget.h"

Should be (at 2 places):

#include "SStandardSlateWidget.h"

After that you should get the “Hello, Slate!” in red text at the top of the viewport as intended. Also note that you have to close VS and RMB on your .uproject and click “Generate Visual Studio Files”. Otherwise VS may not recognize the changes.

But I still have no real idea of how to add a simple SProgressbar using slatewidgets. Everything I try so far raises errors.
Also I welcome a more detailed tutorial (preferably video) explaining slatewidgets into detail. I find loads of UMG/Blueprint tutorials but not a single usable one for slatewidgets in C++.

Perhaps I’ll go with your alternative solution you mentioned earlier. It seems much much more simpler and accomplishes the same:

Alternatively, you can create your HUD widget in UMG through the editor and write your own HUD class to attach it to the viewport.

https://wiki.unrealengine.com/UMG,_Referencing_UMG_Widgets_in_Code