# Store variables values in Editor Utility Blueprint

**URL:** <https://forums.unrealengine.com/t/store-variables-values-in-editor-utility-blueprint/144997>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [June 3, 2020, 8:47am UTC](https://forums.unrealengine.com/t/store-variables-values-in-editor-utility-blueprint/144997 "2020-06-03T08:47:08Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacopo89](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jacopo89](https://forums.unrealengine.com/u/Jacopo89)\
**Post date:** [June 3, 2020, 8:47am UTC](https://forums.unrealengine.com/t/store-variables-values-in-editor-utility-blueprint/144997/1 "2020-06-03T08:47:08Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 3, 2020, 11:21am UTC](https://forums.unrealengine.com/t/store-variables-values-in-editor-utility-blueprint/144997/2 "2020-06-03T11:21:39Z")

</div>

> [@Jacopo89](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![ste1nar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ste1nar](https://forums.unrealengine.com/u/ste1nar)\
**Post date:** [June 3, 2020, 11:39am UTC](https://forums.unrealengine.com/t/store-variables-values-in-editor-utility-blueprint/144997/3 "2020-06-03T11:39:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jacopo89](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jacopo89](https://forums.unrealengine.com/u/Jacopo89)\
**Post date:** [June 4, 2020, 2:58pm UTC](https://forums.unrealengine.com/t/store-variables-values-in-editor-utility-blueprint/144997/4 "2020-06-04T14:58:20Z")

</div>

> [@ste1nar](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![Tetto\_Green](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tetto_green/32/739726_2.png) [@Tetto\_Green](https://forums.unrealengine.com/u/Tetto_Green)\
**Post date:** [November 7, 2020, 9:22pm UTC](https://forums.unrealengine.com/t/store-variables-values-in-editor-utility-blueprint/144997/5 "2020-11-07T21:22:43Z")

</div>

> [@ste1nar](#):
>
> 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.

Thanks! It works!

---

<div class="post-metadata">

**Author:** ![ceeazy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ceeazy](https://forums.unrealengine.com/u/ceeazy)\
**Post date:** [December 25, 2020, 2:43pm UTC](https://forums.unrealengine.com/t/store-variables-values-in-editor-utility-blueprint/144997/7 "2020-12-25T14:43:31Z")

</div>

​

> [@ste1nar](#):
>
> 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.

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. 🙂

Merry Christmas!​

---

<div class="post-metadata">

**Author:** ![halfadog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@halfadog](https://forums.unrealengine.com/u/halfadog)\
**Post date:** [August 18, 2022, 10:14am UTC](https://forums.unrealengine.com/t/store-variables-values-in-editor-utility-blueprint/144997/8 "2022-08-18T10:14:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![EmileVDBerghe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EmileVDBerghe](https://forums.unrealengine.com/u/EmileVDBerghe)\
**Post date:** [October 13, 2022, 2:47pm UTC](https://forums.unrealengine.com/t/store-variables-values-in-editor-utility-blueprint/144997/9 "2022-10-13T14:47:09Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Maderschaden](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Maderschaden](https://forums.unrealengine.com/u/Maderschaden)\
**Post date:** [February 24, 2023, 6:12pm UTC](https://forums.unrealengine.com/t/store-variables-values-in-editor-utility-blueprint/144997/10 "2023-02-24T18:12:44Z")

</div>

@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:  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/a/6/3a641a505d6112662ef1bd396463c7e4a08c8577.png)

---

<div class="post-metadata">

**Author:** ![Phreezer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Phreezer](https://forums.unrealengine.com/u/Phreezer)\
**Post date:** [February 26, 2023, 8:25pm UTC](https://forums.unrealengine.com/t/store-variables-values-in-editor-utility-blueprint/144997/11 "2023-02-26T20:25:28Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![nuklerist](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nuklerist/32/1194598_2.png) [@nuklerist](https://forums.unrealengine.com/u/nuklerist)\
**Post date:** [December 5, 2023, 10:35pm UTC](https://forums.unrealengine.com/t/store-variables-values-in-editor-utility-blueprint/144997/12 "2023-12-05T22:35:58Z")

</div>

Totally agreed and thank for information @Maderschaden , you saved my day
