# Having Persistent data input from @editable values 

**URL:** <https://forums.unrealengine.com/t/having-persistent-data-input-from-editable-values/1772396>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [March 26, 2024, 2:02am UTC](https://forums.unrealengine.com/t/having-persistent-data-input-from-editable-values/1772396 "2024-03-26T02:02:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amintayb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Amintayb](https://forums.unrealengine.com/u/Amintayb)\
**Post date:** [March 26, 2024, 2:02am UTC](https://forums.unrealengine.com/t/having-persistent-data-input-from-editable-values/1772396/1 "2024-03-26T02:02:20Z")

</div>

Hi, 'm a beginner in verse,  
I have this Class as My Main Setting Data

I’m tying to have this Setting Data all over my code to use it’s data,  
This Data is the same for all players and will only initialized once on the Creative Device in UEFN  
I think i should use “Persistent data” somehow like this:

```auto
main_settings := class<concrete><final><persistable>():
    @editable MoneyPerSecondUIText : string = "GPS"
    @editable TotalMoneyUIText : string = "Total Money"

GameSetting : weak_map(session, main_settings) = map{}

SomeFunction():void=
    Print("{GameSetting.TotalMoneyUIText}" #wrong

```

My main purpose to initialize data in UEFN, and use this data all over the code.

---

<div class="post-metadata">

**Author:** ![mikezteh69](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mikezteh69/32/915063_2.png) [@mikezteh69](https://forums.unrealengine.com/u/mikezteh69)\
**Post date:** [March 26, 2024, 3:52am UTC](https://forums.unrealengine.com/t/having-persistent-data-input-from-editable-values/1772396/2 "2024-03-26T03:52:43Z")

</div>

Ok, can you be more specific what the data is holding? I feel like there is already some device that can assist with this. I think there might be a misunderstanding what persistent data is.

Persistent data would be data that persists beyond the game session. Like a permanent leader board that updates with every play session but always has the data that you store in it from all game sessions.

Shared data is data that is updated and shared between all the users at runtime. A lot of devices share data in a sense.

---

<div class="post-metadata">

**Author:** ![Amintayb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Amintayb](https://forums.unrealengine.com/u/Amintayb)\
**Post date:** [March 26, 2024, 8:00am UTC](https://forums.unrealengine.com/t/having-persistent-data-input-from-editable-values/1772396/3 "2024-03-26T08:00:42Z")

</div>

There Are Some Widgets that are supposed to be shown to player how much money he has.  
The widget text is something like this :

> Total Money : $ 1,100

I want that the first part of widget (meaning “Your Total Money”) be a global variable that can be determined using a @editable string. So It Can be changed In (UEFN creative device) before the game lunching.

I’m not sure what exactly I should use to:  
set value for a string in UEFN creative device, and that string is accessible for all functions in main scope, like a global variable, so I’m not forced to pass these variables to all functions that I want to use them in.

![image_2024-03-26_112500410](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/f/3/3f333b6a189503c5024fc2c5430ebc8625c85d20.png)

---

<div class="post-metadata">

**Author:** ![mikezteh69](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mikezteh69/32/915063_2.png) [@mikezteh69](https://forums.unrealengine.com/u/mikezteh69)\
**Post date:** [March 26, 2024, 5:26pm UTC](https://forums.unrealengine.com/t/having-persistent-data-input-from-editable-values/1772396/4 "2024-03-26T17:26:01Z")

</div>

> [@Amintayb](#):
>
> Total Money

This is the string you want global? What would you change it to? Or would it always say the same thing? If you want to interact with something you have to first declare it and set a default variable value. Then you can change the variable at runtime when needed.

So if you want the variable name to be CurrencyDescriptor, your declaration could look like this:

`CurrencyDescriptor : string = "Total Money"`

That probably does not NEED to be editable. Since it is going to be dynamically set in code.

Then to change it at runtime, you need an event to be triggered. In that event you would want to include:

`set CurrencyDescriptor = "Your New String"`

Hope that helps.
