how do I access a string variable in a widget blueprint different from my other blueprint
For example: say I have a Login Widget Blueprint with a Player Name string variable set public that gets set in it upon login
How do I access that string variable from another blueprint?
I tried doing like a direct reference to the Get Player Name, but then it asks for a Target
which is where I get confused…
Basically what you would need to do is simply store this string variable somewhere where it can be accessed. Because you mentioned you would like this to be the login information, and possibly get this information whether you are in a menu or in game.
The best place would either be saving out this data locally in a save game file, OR alternatively you could set this in the Game Instance (Which is consistent across the game session). This will allow you to Get the game instance → Cast to the Game Instance → And Getting the Player Name variable.
Keep in mind that each client will only see their own Player name variable. If you would like other players to know about this name then setting this within the player state when the game starts (From the game instance/save game at the start of the game).