# UMG buttons not working with level streaming

**URL:** <https://forums.unrealengine.com/t/umg-buttons-not-working-with-level-streaming/590688>\
**Category:** UI\
**Tags:** unreal-engine, UE5-0, question, UMG\
**Created:** [June 26, 2022, 12:13pm UTC](https://forums.unrealengine.com/t/umg-buttons-not-working-with-level-streaming/590688 "2022-06-26T12:13:19Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![jarcykd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jarcykd](https://forums.unrealengine.com/u/jarcykd)\
**Post date:** [June 26, 2022, 12:13pm UTC](https://forums.unrealengine.com/t/umg-buttons-not-working-with-level-streaming/590688/1 "2022-06-26T12:13:19Z")

</div>

Hi,

I’m creating a FPP game prototype and I have an Inventory/Stats/Map widget that can be displayed by pressing a button (currently TAB). The widget is launched from Player Character Blueprint. When I use it on single levels it all works fine.  
But on maps that involve level streming buttons become irresponsive. Once I click any button mouse pointer only blinks for a moment and nothing happens.

I tried spawning the widget from a level manager actor (that I created to store level data), but to no avail…

How can I solve it?

Thanks.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 26, 2022, 2:47pm UTC](https://forums.unrealengine.com/t/umg-buttons-not-working-with-level-streaming/590688/2 "2022-06-26T14:47:23Z")

</div>

It’s really hard to say anything without seeing any code. But are you using ‘get current level name’ perhaps? It doesn’t work with streaming.

---

<div class="post-metadata">

**Author:** ![jarcykd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jarcykd](https://forums.unrealengine.com/u/jarcykd)\
**Post date:** [June 26, 2022, 4:23pm UTC](https://forums.unrealengine.com/t/umg-buttons-not-working-with-level-streaming/590688/3 "2022-06-26T16:23:00Z")

</div>

Than you for responding.

This is the code:

The first shows the script in Player Character Blueprint. I tried to follow how Fallout games do it. You press tab to open the menu but pressing it again will close it. This way any open menu can be closed with tab.

 ![Player Blueprint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/b/a/2ba77118391bcbc89ac5c2b42dbc4f24e4900c30.png)

The widget itself looks like this (the buttons at the top switch between widgets and the one in the bottom closes the window):

 ![Widget Layout](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/c/c/4cc8d78d7413ba4d309f057b6c8e306df3e7a643.png)

This is the code I put in an actor that manages level data (Time of day, and bunch of other settings). Such actos is present in each level that is being streamed to the persistent level. The persistent level does not have such actor.

 ![Level Manager Blueprint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/3/8/d383f9e41a606767d46a075cf42122e9eaeaa961.png)

I also tried to put identical code into Level Blueprint.

Any help would be appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 26, 2022, 5:03pm UTC](https://forums.unrealengine.com/t/umg-buttons-not-working-with-level-streaming/590688/4 "2022-06-26T17:03:23Z")

</div>

Is more than one map streamed in at once?

Regardless, it makes much more sense, to put the widget control in the persistent level 🙂

---

<div class="post-metadata">

**Author:** ![jarcykd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jarcykd](https://forums.unrealengine.com/u/jarcykd)\
**Post date:** [June 26, 2022, 6:09pm UTC](https://forums.unrealengine.com/t/umg-buttons-not-working-with-level-streaming/590688/5 "2022-06-26T18:09:14Z")

</div>

Hi,

Only one level is streamed at once.

In one of my attempts I’ve put that code into Persistent Level Blueprint but with no results. It got even worse, because when I displayed the widget and pressed TAB again to close it, it didn’t work (which happens when widget was launched from player blueprint).

I’ll be grateful for any suggestions.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 26, 2022, 6:23pm UTC](https://forums.unrealengine.com/t/umg-buttons-not-working-with-level-streaming/590688/6 "2022-06-26T18:23:00Z")

</div>

The two most logical places to control menus from are the persistent level or, even better, the game instance.

There’s not a lot I can say about it. If you use the GI, the timing of opening and closing levels doesn’t matter ( you can even use ‘open level’ ) because the GI is constant throughout the game.

---

<div class="post-metadata">

**Author:** ![jarcykd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jarcykd](https://forums.unrealengine.com/u/jarcykd)\
**Post date:** [June 26, 2022, 7:58pm UTC](https://forums.unrealengine.com/t/umg-buttons-not-working-with-level-streaming/590688/7 "2022-06-26T19:58:52Z")

</div>

I tied it but GI seems not to receive input. It fails for both action events and direct key bindings. Do I have to preare the GI to receive player input?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 27, 2022, 6:10am UTC](https://forums.unrealengine.com/t/umg-buttons-not-working-with-level-streaming/590688/8 "2022-06-27T06:10:47Z")

</div>

I will come back to you on that one ( not at a machine rn ).

---

<div class="post-metadata">

**Author:** ![zblogin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zblogin](https://forums.unrealengine.com/u/zblogin)\
**Post date:** [June 27, 2022, 7:30am UTC](https://forums.unrealengine.com/t/umg-buttons-not-working-with-level-streaming/590688/9 "2022-06-27T07:30:07Z")

</div>

You can use “Interface” to do something.  
1.GameInstance Interface: create new function A;  
2.GameInstance: implement function A-\>create/remove your UMG;  
3.Player Character Blueprint/Player Controller Blueprint: TAB event-\>call function A(use interface, don’t cast your GI)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 27, 2022, 7:31pm UTC](https://forums.unrealengine.com/t/umg-buttons-not-working-with-level-streaming/590688/10 "2022-06-27T19:31:22Z")

</div>

Right. So long since I did it, I typed a load of rubbish there.

If you want to get the menus independent of the level loading, then you will need to use level streaming.

Then, you can have an actor blueprint in the persistent level that responds to menu commands.

It is true that the GI is running all the time, even when you use ‘open level’, but I don’t think you can talk to it ( with inputs ).

---

<div class="post-metadata">

**Author:** ![jarcykd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jarcykd](https://forums.unrealengine.com/u/jarcykd)\
**Post date:** [June 27, 2022, 8:12pm UTC](https://forums.unrealengine.com/t/umg-buttons-not-working-with-level-streaming/590688/11 "2022-06-27T20:12:51Z")

</div>

Thank you both for suggestions.

I tested them both and I still get the same result. The Widget displays or dissapears when I press TAB but none of the buttons is responding.  
Oddly, I have no problem with keyboard inputs. When I press TAB repeatedly the focus switches between buttons and I can use space or enter to “click” them. But not with mouse.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 28, 2022, 6:58am UTC](https://forums.unrealengine.com/t/umg-buttons-not-working-with-level-streaming/590688/12 "2022-06-28T06:58:01Z")

</div>

Is it because TAB is a default widget navigation key?

Something like this?

> [@UMG - disable TAB and Nav keys?](https://forums.unrealengine.com/t/umg-disable-tab-and-nav-keys/320243/2):
>
> I am not sure if you’re still having this problem but here is a solution I recently came up with: There is one setting and one variable that need to be disabled to stop buttons from accepting keyboard inputs. At the very bottom of the details panel in the designer is a setting called “Is Focusable” which you need to turn off for each button or other selectable widget in your menu. The variable is “bSupportsKeyboardFocus” in the behavior category. I’ve included screenshots of both of these below…

---

<div class="post-metadata">

**Author:** ![jarcykd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jarcykd](https://forums.unrealengine.com/u/jarcykd)\
**Post date:** [June 29, 2022, 3:59pm UTC](https://forums.unrealengine.com/t/umg-buttons-not-working-with-level-streaming/590688/13 "2022-06-29T15:59:30Z")

</div>

Thank you for the answer but unfortunately it still didn’t solve the actual problem. I don’t mind focusable buttons. What I need is these buttons respond to mouse.

The issue is level streaming. Regular levels have no problem with it.

So far no success:(

---

<div class="post-metadata">

**Author:** ![jarcykd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jarcykd](https://forums.unrealengine.com/u/jarcykd)\
**Post date:** [August 1, 2022, 7:37pm UTC](https://forums.unrealengine.com/t/umg-buttons-not-working-with-level-streaming/590688/14 "2022-08-01T19:37:22Z")

</div>

Hi,

I found the solution, finally. The buttons were blocked by another widget. I created loading screen widget and I gave it Z order of 10. Even if it was invisible it still occupied the space above my menu widget.

Once i set the Z Order of my menu widget to something above the problem was resolved.

Thanks for your help:)
