# How can I add a HUD-type element IN-Editor?

**URL:** <https://forums.unrealengine.com/t/how-can-i-add-a-hud-type-element-in-editor/357702>\
**Category:** UI\
**Tags:** unreal-engine, editor, slate, CPP, question\
**Created:** [May 17, 2016, 2:28pm UTC](https://forums.unrealengine.com/t/how-can-i-add-a-hud-type-element-in-editor/357702 "2016-05-17T14:28:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![antithing](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@antithing](https://forums.unrealengine.com/u/antithing)\
**Post date:** [May 17, 2016, 2:28pm UTC](https://forums.unrealengine.com/t/how-can-i-add-a-hud-type-element-in-editor/357702/1 "2016-05-17T14:28:23Z")

</div>

Hi, Is it possible to add a floating hud element in the editor? It must be possible, as the fps counter can be shown, and the move/snap tools are essentially an element themselves…

---

<div class="post-metadata">

**Author:** ![ScottSpadea](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/scottspadea/32/1194682_2.png) [@ScottSpadea](https://forums.unrealengine.com/u/ScottSpadea)\
**Post date:** [May 17, 2016, 2:51pm UTC](https://forums.unrealengine.com/t/how-can-i-add-a-hud-type-element-in-editor/357702/2 "2016-05-17T14:51:19Z")

</div>

you can use the widget reflector to see what widget those editor buttons are made from. so SEditorViewport seems like it might be important for what you want to do, so maybe take a look at the source for SEditorViewport :: MakeViewportToolbar.

> **[SEditorViewport::MakeViewportToolbar](https://docs.unrealengine.com/5.1/en-US/API/Editor/UnrealEd/SEditorViewport/MakeViewportToolbar/)**
>
> Implement this to add a viewport toolbar to the inside top of the viewport.

i don’t know much about changing the editor, but this guy does:

---

<div class="post-metadata">

**Author:** ![antithing](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@antithing](https://forums.unrealengine.com/u/antithing)\
**Post date:** [May 17, 2016, 2:52pm UTC](https://forums.unrealengine.com/t/how-can-i-add-a-hud-type-element-in-editor/357702/3 "2016-05-17T14:52:55Z")

</div>

Many thanks! Will take a look.

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [May 17, 2016, 3:20pm UTC](https://forums.unrealengine.com/t/how-can-i-add-a-hud-type-element-in-editor/357702/4 "2016-05-17T15:20:04Z")

</div>

FPS counter is printed using HUD canvas not Slate and it not part of editor code as it exists in packaged game too, in fact it is leftover from UE3

---

<div class="post-metadata">

**Author:** ![antithing](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@antithing](https://forums.unrealengine.com/u/antithing)\
**Post date:** [May 17, 2016, 3:21pm UTC](https://forums.unrealengine.com/t/how-can-i-add-a-hud-type-element-in-editor/357702/5 "2016-05-17T15:21:23Z")

</div>

Hi, thanks! So I can use HUD canvas in editor? Could you point me in the direction of an example please?

---

<div class="post-metadata">

**Author:** ![antithing](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@antithing](https://forums.unrealengine.com/u/antithing)\
**Post date:** [May 17, 2016, 3:34pm UTC](https://forums.unrealengine.com/t/how-can-i-add-a-hud-type-element-in-editor/357702/6 "2016-05-17T15:34:02Z")

</div>

Aha, I have discovered [this](https://forums.unrealengine.com/showthread.php?104749-How-to-draw-HUD-in-editor) which works for me.

Thank you @anonymous_user_f5a50610 for putting me on the right rack with HUD Canvas.

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [May 17, 2016, 4:15pm UTC](https://forums.unrealengine.com/t/how-can-i-add-a-hud-type-element-in-editor/357702/7 "2016-05-17T16:15:16Z")

</div>

By looks of it “stat fps” and other stat commads displays are part of statgroups which apper in profiler, but i’m not sure how to make them draw in editor, here oyu have example how to make stat gorup:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

I find the way to attack to “show” command but it seems oyu can create your own show flags, you can only add elements to it

[https://github.com/EpicGames/UnrealEngine/blob/dff3c48be101bb9f84633a733ef79c91c38d9542/Engine/Source/Runtime/GameplayAbilities/Private/AbilitySystemDebugHUD.cpp#L151](https://github.com/EpicGames/UnrealEngine/blob/dff3c48be101bb9f84633a733ef79c91c38d9542/Engine/Source/Runtime/GameplayAbilities/Private/AbilitySystemDebugHUD.cpp#L151)

---

<div class="post-metadata">

**Author:** ![antithing](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@antithing](https://forums.unrealengine.com/u/antithing)\
**Post date:** [May 17, 2016, 4:24pm UTC](https://forums.unrealengine.com/t/how-can-i-add-a-hud-type-element-in-editor/357702/8 "2016-05-17T16:24:30Z")

</div>

Thank you ! Much appreciated.
