In my FirstPersonGameMode blueprint there is a variable for the player’s start point. I don’t want to manually go into the class and change the default value. So I created an Editor Utility Widget so I can change it there easily. Of course this is not during PIE. I have no idea how to access the game mode from the editor though?
How can I change the (default) variable value for a BP (game mode specifically) from an Editor Widget?
Alternatively, how can I access the Editor Widgets variables from the game (then I could read the value in BeginPlay)?
Please post your code here so that I can know how to solve your problem.
In most cases, you can use “GetGameMode” node then use “Cast to yourGamemodeType” node to access your gamemode instance in any blueprint inheritanted from Actor or UserWidget.
Since I am not in play mode I can’t simply get game mode.
I found a workaround (or maybe actual solution?): I created a Data Asset with BPs, then made an actual Data Asset from it which stores my variable. Both the EUW and the game mode BP can access this Data Asset and get/set the variable.