Hey, I startet Programming a few days ago with blueprints in Unreal and I was wondering, how can I save a user Imput from the Text Box and store it in a String for later use. And is it possible to print a sentence in witch the string is includet? [for exampel: Hello my Name is (string).]
In GameMode class. If you want it to be persistent between the level (GameMode resets on level restart and switch) use GameInstance instead.
If you want to keep the variable state between the runs of the game you either by saving games
Or saving variable in ini config by flagging variable as “Config” in property editor (hidden in advance config, arrow at bottom of category). Hover over config to see tooltip explaining how it works. Note that ini config is easily editable by user.
You got more options in C++, you can load and save config on depend and do more specific config writing and reading in GConfig, as well you can write things to file to save
You can convert from Text variable type to String variable type with a simple blueprint node (right click and type Text to String).
ShadowRiver’s suggestions on how to save it should all work.
There is also the option of using Unreal’s Save object (there are video tutorials on how to use it), but it’s not as simple to use as ShadowRiver’s suggestions. However, it is my preferred method if I need to persist save data not only between levels but also preserve it between uninstalls and re-installs of the game on the user’s system.