Store variables values in Editor Utility Blueprint

Is it possible to store variables values through editor sessions (not in game)? For example, the coordinates of some chosen points.
At the moment when i close and re-open my project the variable values are back to default (0,0,0).

You can use the save game.

It’s not what they are intended for, and is maybe more of a hack, but you can use a Primary Data Asset. Its data can be changed from the editor or even during pie.
To make it, create new blueprint class - all classes - primary data asset. This is where you create the properties you need.
Then right click the content browser - misc - data asset - select your primary data asset.

Now you can in any blueprint create a variable of type your primary data asset and select the child one, which is a single instance that any class can have access to.

Do note that sometimes when starting the editor, the variable can have been reset to none.


Well man, i really need to thank you for the help. I don’t know if there are other easier way to do it, but certainly with your trick everything is working fine.

Thanks! It works!

Hey ste1nar,

that worked, thank you so much! What a Christmas present. Specifically logged in to make my first post after 4 years of lurking for this (for more to come!). You saved my time and debug UI. :slight_smile:

Merry Christmas!​

1 Like

I have done as you said but the primary data asset ALWAYS reset on starting the editor, what could be the cause?

I’m also trying to use this method, but the primary data asset also resets for me when restarting the editor. Anyone know the solution to this, or an alternative way to save variables when restarting the editor?

@halfadog @EmileVDBerghe
I had the same problem but this answer still works and it turns out you just need to save the Data Asset after changing any values in it via blueprints. Then it will not reset after an Editor restart.

To do that, just use the “Save Loaded Asset” node:

This is wonderful and thank you… But I have to ask: how do you know this very obscure bit of information and where can I go to find training that would provide me with the fundamental knowledge you seem to have? Unreal seems to be filled with these little ‘gotchas’ where absolutely nothing is officially explained… But somebody out there knows.(God bless you btw)
A Google search led me here…