I have Widget with one button. I want to click on button (**Button_93 **in my case )and open level **m_MainMenu **and in **m_MainMenu **I want to get variable from Widget button.
I used to game instance to pass the variable, it’s the logical choice. The game mode is actually there to choose your configuration of controller, player, etc. But it doesn’t really matter, it works in exactly the same way.
I will also do ( in a little while ) an example of how I would do this, because trying to talk to the level BP is like pulling teeth, as you can see
Notice how the widget has to cast the GI to put the variable in, but what’s cool is that it doesn’t need to cast to send the load level message ( see it’s using the uncast connection ). That’s because blueprint interface messages can be sent to any actor.
So, the widget sends the interace message to the GI ( or game mode etc ), that triggers the event which loads the level.