How can I cast from LevelBP to Widget & Widget to LevelBP?
I am creating my widget within another widget, unfortunately.
I’m adding the ChildToOverlay
Maybe I can add my CharacterBP to the mix…from widget creation, set var in CharacterBP. LevelBP will cast to CharacterBP and get that variable.
Then I can utilize it in the LevelBP?
Well I actually use two Characters.
This is kinda ■■■■■■
How can I reference an ActorBP in the scene in a widget? then?
Basically my main menu and pause menu create the same options menu. I want the options menu to remember the last applied settings.
So use functions in GameInst? GetGameInst → CastToMyCustomGameInst
Call this from my OptionsMenu…so simple!!! Thanks.
I must reference (in GameInst) an actor in my level. It is responsible for all my saving and loading to and from .sav
How can I do this?
Does that work in any BP and it references it always inside the Level? Just wondering about a description of the node, if it’ll work for my case.
I was thinking of widgets when it came to this node, so secretly I failed to use it in this case.
LevelBPs and widgets are completely different and have nothing to do with each other.
You have to save a reference to your widget.
I guess you want to communicate between the widget and the levelBP.
Take a look at this:
You have to set the reference manually. Simply typing in the type does not automatically set the reference.
ie. When you create your widget you can save the widget reference in your level blueprint or actor. if you want to set a variable in your widget to the level blueprint you have to manually set is too.
You have to figure out a way of getting a reference to your object. there are a million ways of archiving that.
you can save these settings in an game instance. That way they persist over multiple levels. If you need the save them over sessions but them into a save game on load them at the beginning of the game
Its probably not a wise decision to use an actor for that. Use a game mode or game instance instead.
If push comes to shove you can still use a GetAllActorsOfClass node