# Remove all Widget kills the Touch Interface

**URL:** <https://forums.unrealengine.com/t/remove-all-widget-kills-the-touch-interface/336995>\
**Category:** UI\
**Tags:** bug, touch-interface, unreal-engine, Widget, question, UMG\
**Created:** [October 30, 2015, 6:55pm UTC](https://forums.unrealengine.com/t/remove-all-widget-kills-the-touch-interface/336995 "2015-10-30T18:55:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nomte](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nomte](https://forums.unrealengine.com/u/Nomte)\
**Post date:** [October 30, 2015, 6:55pm UTC](https://forums.unrealengine.com/t/remove-all-widget-kills-the-touch-interface/336995/1 "2015-10-30T18:55:47Z")

</div>

Hi guys!  
If I use “Remove all Widgets”, the Touch Interface dissappear forever. Very easy to replicate in a blank new project. I found this behaviour a little strange to me since the Touch Interface doesn’t seems to be a UserWidget class. I would like to know it UE4 is intended to work like that or if there is a workaround since “Remove all Widgets” is very handy to my project.

Thanks in advance 🙂

Cheers,  
Nomte.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e645c867](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e645c867](https://forums.unrealengine.com/u/anonymous_user_e645c867)\
**Post date:** [November 14, 2015, 2:41pm UTC](https://forums.unrealengine.com/t/remove-all-widget-kills-the-touch-interface/336995/2 "2015-11-14T14:41:46Z")

</div>

Hi there, I have the same issue and I really like using “remove all widget” but it destroys the touch interface.  
It seems that the default touch interface is somehow hardcoded and can’t be called again in runtime.

Any thoughts?

---

<div class="post-metadata">

**Author:** ![Nomte](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nomte](https://forums.unrealengine.com/u/Nomte)\
**Post date:** [November 21, 2015, 6:57pm UTC](https://forums.unrealengine.com/t/remove-all-widget-kills-the-touch-interface/336995/3 "2015-11-21T18:57:49Z")

</div>

Any reaction?. Up

Best,  
Nomte

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [January 10, 2016, 1:04pm UTC](https://forums.unrealengine.com/t/remove-all-widget-kills-the-touch-interface/336995/4 "2016-01-10T13:04:25Z")

</div>

Dear Community,

The way to remove all widgets of certain classes is to use

```
GetAllWidgetsofClass -> For Each - > Remove From Viewport

```

I contributed **GetAllWidgetsOfClass** to the Engine early in UE4’s development, and offered **RemoveAllWidgetsOfClass** as well, but Epic preferred people to make their own blueprint library to add this second node.

**GetAllWidgetsOfClass**

[https://github.com/EpicGames/UnrealEngine/pull/569](https://github.com/EpicGames/UnrealEngine/pull/569)

**RemoveAllWidgetsofClass**

[https://github.com/EpicGames/UnrealEngine/pull/587](https://github.com/EpicGames/UnrealEngine/pull/587)

(must logged into your ue4-linked github account to see above links

#Design Idea For You

I make my own UUserWidget base class that I inherit all my game widgets from, so I can just call GetAllWidgetsOfClass on my custom base widget class, to remove all of my widgets at any time 🙂

So in Editor

Create-\> UserInterface → Widget and just give it a name like MyBaseWidget

Then File → Reparent all of your widgets to this BaseWidget class / BP and then you can easily clear your UI at any time using GetAllWidgetsOfClass(BaseWidget) (All in BP)

#❤

Rama

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_48f2118e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_48f2118e](https://forums.unrealengine.com/u/anonymous_user_48f2118e)\
**Post date:** [December 11, 2016, 9:43pm UTC](https://forums.unrealengine.com/t/remove-all-widget-kills-the-touch-interface/336995/5 "2016-12-11T21:43:31Z")

</div>

Better solution is to just call the “Activate Touch Interface” blueprint node after you remove all widgets. That will turn the touch interface back on.

---

<div class="post-metadata">

**Author:** ![CGough](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CGough](https://forums.unrealengine.com/u/CGough)\
**Post date:** [October 21, 2017, 10:23pm UTC](https://forums.unrealengine.com/t/remove-all-widget-kills-the-touch-interface/336995/6 "2017-10-21T22:23:01Z")

</div>

Many thanks for this. It;s the fix I needed and thanks for the good work developing it in the engine.

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [October 30, 2020, 4:24am UTC](https://forums.unrealengine.com/t/remove-all-widget-kills-the-touch-interface/336995/7 "2020-10-30T04:24:17Z")

</div>

I wish. In .25 this does precisely nothing. There are several reports this has been occurring since .21
