Download

Any way to save in-editor project-wide data from Blueprints?

Is there any way to save data (e.g. a struct array) in blueprints that will be available in the entire project, from any map, in editor (without hitting Play)?
Data Tables can’t be modified from Blueprints, e.g. you can’t add new rows from an editor blueprint.
I’ve tried using a SaveGame object, but it crashes when trying to create & save one in editor.

The only idea I have so far is to use Fill Data Table From CSV String. So if we need to add something to a data table from the editor, we get the current data as string (e.g. Get Data Table Column as String), convert it to CSV format using string operations, add the new entry to the string and then use the first function to fill the data table.
Quite hacky solution, but it might work.

You can simply create a Blueprint asset of type Object containing that array and use GetMutableDefault<UMyObjectClass>() then write to its default values.

Using an Object is a good idea, but I have to do it in a pure Blueprint project, unfortunately - and if I’m not mistaken, we can only GetClassDefaults from a class in BPs, there’s no option to write into default values.