How do I save my widget values throughout scenes?
Thank You!
How do I save my widget values throughout scenes?
Thank You!
Hey there @Shuantheone! Welcome to the community! If you’re just trying to keep variables between scenes you have a couple of options depending on your use case. I’ll name a couple of options for keeping data between levels and use cases in which you’d use them. If neither of these work for your use case, let me know!
Basically for UI it’s often best to have UI observe the values, not so much have the UI have it’s own values (though that’s dependent on your use case).
Game instance: The game instance is the best place to house data that you want to move between scenes but not necessarily be saved between play sessions (but it’s also where you save and load data from when using a save system).
Saving/Loading: You would use the save system when you want to store a save file on the platform you’re using. This can store any types of variables, but it’s unwieldy to use for just transferring data between levels, it’s better for if you need to save data between sessions.
Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.
Gameinstance:
SaveGame Tutorial:
SaveGame Docs:
Press Shift+F1 to regain mouse control. Select the Actors that you want to keep changes for in the World Outliner. Right-click in the World Outliner, then select Keep Simulation Changes in the right-click menu.
Thanks a ton! I’m using a Game instance