# Using Slate with WidgetComponent

**URL:** <https://forums.unrealengine.com/t/using-slate-with-widgetcomponent/46695>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [November 5, 2015, 11:31am UTC](https://forums.unrealengine.com/t/using-slate-with-widgetcomponent/46695 "2015-11-05T11:31:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fallonsnest](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fallonsnest](https://forums.unrealengine.com/u/Fallonsnest)\
**Post date:** [November 5, 2015, 11:31am UTC](https://forums.unrealengine.com/t/using-slate-with-widgetcomponent/46695/1 "2015-11-05T11:31:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![BrUnO\_XaVIeR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bruno_xavier/32/1110230_2.png) [@BrUnO\_XaVIeR](https://forums.unrealengine.com/u/BrUnO_XaVIeR)\
**Post date:** [November 5, 2015, 12:52pm UTC](https://forums.unrealengine.com/t/using-slate-with-widgetcomponent/46695/2 "2015-11-05T12:52:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![szyszek](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@szyszek](https://forums.unrealengine.com/u/szyszek)\
**Post date:** [November 5, 2015, 1:00pm UTC](https://forums.unrealengine.com/t/using-slate-with-widgetcomponent/46695/4 "2015-11-05T13:00:30Z")

</div>

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.
