Download

Using Slate with WidgetComponent

For my game project all UI is done using Slate C++

When using UMG instead, its possible to add the Widget component to your character BP with a spring arm for some camera lag to have a cool HUD effect.

Underlying, the UMG is using slate widgets, so it should be possible to setup a slate widget as the Widget Component somehow …

But is there an easy way for this :o

UMG have ‘native widget’ which you can attach your slate object into.

Yea, you will have to wrap your c++ widgets within UUserWidget so it can be visible in UMG and then used by WidgetComponent

Edit:
After a look at WidgetComponent code I noticed that there is a variable SalteWidget which is an actual window. Since most of the stuff in WidgetComponent is protected you could try to extend its functionality so it accepts c++ slate widgets too. Although, it’s a good practice to expose your c++ widgets to UMG for styling purposes.