# How to add widget in editor viewport(not in PIE)

**URL:** <https://forums.unrealengine.com/t/how-to-add-widget-in-editor-viewport-not-in-pie/155853>\
**Category:** Editor Scripting\
**Tags:** unreal-engine\
**Created:** [January 4, 2021, 1:03pm UTC](https://forums.unrealengine.com/t/how-to-add-widget-in-editor-viewport-not-in-pie/155853 "2021-01-04T13:03:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oleg\_Mazunin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oleg\_Mazunin](https://forums.unrealengine.com/u/Oleg_Mazunin)\
**Post date:** [January 4, 2021, 1:03pm UTC](https://forums.unrealengine.com/t/how-to-add-widget-in-editor-viewport-not-in-pie/155853/1 "2021-01-04T13:03:06Z")

</div>

Hi, guys!  
Is it possible to add widget in editor viewport(not in PIE)? I want to put all parameters of CineCamera on top and bottom of editor viewport.

---

<div class="post-metadata">

**Author:** ![DiluvialDrifter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DiluvialDrifter](https://forums.unrealengine.com/u/DiluvialDrifter)\
**Post date:** [January 7, 2021, 4:58am UTC](https://forums.unrealengine.com/t/how-to-add-widget-in-editor-viewport-not-in-pie/155853/2 "2021-01-07T04:58:39Z")

</div>

> **[Editor Utility Widgets](https://docs.unrealengine.com/5.1/en-US/editor-utility-widgets-in-unreal-engine/)**
>
> An overview and usage instructions for Editor Utility Widgets

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/a/8/ca8a29599935ae11b7c01ff006666c990f4ea136.jpeg "WTF Is? Editor Utility Widget in Unreal Engine 4 ( UE4 )") ](https://www.youtube.com/watch?v=C9UAuH72z6M)

---

<div class="post-metadata">

**Author:** ![Oleg\_Mazunin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oleg\_Mazunin](https://forums.unrealengine.com/u/Oleg_Mazunin)\
**Post date:** [January 7, 2021, 11:38am UTC](https://forums.unrealengine.com/t/how-to-add-widget-in-editor-viewport-not-in-pie/155853/3 "2021-01-07T11:38:50Z")

</div>

> [@Caustik\_](#):
>
> [Editor Utility Widgets in Unreal Engine | Unreal Engine 5.3 Documentation](https://docs.unrealengine.com/en-US/InteractiveExperiences/UMG/UserGuide/EditorUtilityWidgets/index.html)  
> [https://www.youtube.com/watch?v=C9UAuH72z6M&ab\_channel=MathewWadstein](https://www.youtube.com/watch?v=C9UAuH72z6M&ab_channel=MathewWadstein)

Hi, @Caustik\_ !  
Thanks for your response! I know about Editor Utility Widget, but I want to put information exactly in the viewport, because I capture the viewport by OBS and I need to have information line about Camera parameters and other parameters inside the viewport

---

<div class="post-metadata">

**Author:** ![DiluvialDrifter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DiluvialDrifter](https://forums.unrealengine.com/u/DiluvialDrifter)\
**Post date:** [January 15, 2021, 8:25am UTC](https://forums.unrealengine.com/t/how-to-add-widget-in-editor-viewport-not-in-pie/155853/4 "2021-01-15T08:25:17Z")

</div>

Ah, sorry. I should have read the question more carefully.  
Maybe look into custom profiling stats?  
I did some experimenting.  
Here I have created an Editor Utility Widget named Test.  
I have opened it, as well as another (Undocked) viewport window  
I have docked the Test Editor Utility Widget in the second viewport.  
From my understanding of OBS you should be able to simply capture the second (undocked) viewport window.  
[SPOILER]

 ![Capture.PNG.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/8/3/83e46b130aa4063da4677ca92a2fdc2b7a74c74b.jpeg)[/SPOILER]

---

<div class="post-metadata">

**Author:** ![ALooFMe66](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ALooFMe66](https://forums.unrealengine.com/u/ALooFMe66)\
**Post date:** [May 13, 2024, 1:46pm UTC](https://forums.unrealengine.com/t/how-to-add-widget-in-editor-viewport-not-in-pie/155853/5 "2024-05-13T13:46:28Z")

</div>

you can use SLevelViewport::AddOverlayWidget(TSharedRef OverlaidWidget) to add your widget to level editor widget.there are some ways to get it:

1. LevelEditorModule::OnLevelEditorCreated(TSharedPtr InLevelEditor), you can get  
TSharedPtr From ILevelEditor::GetViewports().  
2.you can use GCurrentLevelEditingViewportClient,it is a global Var means Current Editor Active Viewport,and use FLevelEditorViewportClient::GetEditorViewportWidget(),but this func return a const Var,so i do like this:  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/a/7/7a7bcc30e2d88bd76c013c73b96ab426e2e2dff3.png)
