How can you call a widget inside a widget?

i have a widget that i created to select a level to play but i have another widget to call for areas of the level. unfortunately the sub widget does not get called. can someone take a look and advise please?

crappy image attached below

Creating widget is not enough, you either need to add widget to view port (same as you probably already did with main widget) or add it to parent layout widget (like canvas widget you probably have)

I recommend using a Game Instance Blueprint for handling the open and closing of levels. You can use any blueprint just about to cast to the Game Instance BP and then Call the “Open Level” event that you made and then just set the name of whatever level you want to open.

~EDIT~ You can also create a Custom Event for Sublevels. Its just repeating the step and adding a variable to store in the Game Instance. (I’m not sure exactly how you’re setting your game up, assuming you have Main Level then Sub Levels, I’d store the main level you pick in the “Test Widget” as a variable in the Game Instance, similar to opening a level, then after creating a Variable with a Custom Event (Store main Level – Custom Event) call the Custom Event “Open Level” then the name input would be your sub Level))

Create a Game Instance and create a custom event like this:

Create a Widget Blueprint and Add your layout however you want it, mine looks like this:

Set an “On Clicked” event for your submit button to call the “Open Level Custom Event”:

Set Your Project Settings – Game Instance to the Game Instance you made earlier

That should be all it takes and you can cast to and call this event from any blueprint exactly like you did on the Buttons “On Clicked Event”

Hope this helps!

i see i had to do that in the character blueprint for the pause menu so i’ll try to do the same with the object (it’s a collision box that brings up this new menu)

thank you so much, i completely forgot about that part

this is really helpful but does it open a widget for a map area and then can you call a level from the map area widget it opens? i’m probably not being clear about it…