Accessing level blueprint variables in a widget blueprint?

So I have some variables that I created in the level blueprint, which are part of an equation. I need to put these in a Widget Blueprint to print them onto the screen all nice and pretty. However, you can’t access the level blueprint variables from a Widget Blueprint. So does anyone know how to essentially make these variables globally available? It’s a pretty complex equation, so if its possible to access these variables right away, instead of redoing the entire thing in the character blueprint, that would be ideal.

you can’t access levelBP variables from other BPs. Put them in your gameinstance or similar (game singleton, game mode - serverside)
other posibility, create the vars in your widget and set expose on spawn to true, create your widget from levelbp and pass the variables (by ref)
For mathematic expressions (if they are) use the “add math expression” node - it is awesome to get things clean and tidy

You wouldn’t want to access level blueprint variables from within a widget because when the level changes, those variables wouldn’t exist anymore making your widget useless. You have two options. Either create a Blueprint Interface in which to store your variables, or add the variables to the game mode blueprint. I create a master game mode blueprint that defines a bunch of variables and then create child blueprints to change those variables from level to level. Then when you create your widget you cast to the master game mode bp and use “Game mode” as the object and it will automatically grab the child bp that you’ve assigned in your world settings.

Also, if you’ve already set up the blueprint, just create the variables inside the game mode master bp and then you can reference it once (cast to) and then grab the variables from it and link them back in so there’s less work. OR you could also move everything out of the levelbp and into it’s own blueprint by creating the same variables (with the same names) in a new bp and then copy and pasting the nodes from the levelbp into the new one. Just don’t try to actually run any code from within the game mode as it’s not really present in the world at run time. You can use it to store variables but don’t bother setting anything up in the event graph (well, at least not anything to run off Begin Play).

If it absolutely has to be from the levelBP, instead of trying from the widget to the levelBP you can always get the widget from the levelBP and push the values that way from within the levelBP itself. If the widget is saved as a variable in the player character or controller, you can use a get player pawn node, or get player controller node etc. and then from there cast to whatever the class is and pull the specific widget variable and then set the values directly from the levelBP.