Data Asset Array of Custom Structures resetting to empty when restarting the editor

Trying to use a Data Asset to store a bunch of game data that I want to access at runtime to read (but not write to). I want this so I can get info about a, for example, piece of equipment. Data for that equipment would be stored in the DataAsset’s “Items” array, and I can just query it by name to get info about that equipment (like cost, inventory icon, BP to spawn when the player equips it, etc). This system works great for me, BUT it seems the editor keeps losing reference to the data in this array when I restart the editor.

Data Asset (DBA_Items) parent class is Primary Data Asset
That DBA_Items asset has a variable “Items”, which is a Map of Enum (E_Items) and Structures (S_ItemDatabaseEntry). It was previously just an Array of Structures, and this same issue was happening.
DBA_Items asset also has a varible “Colors”, which is an Array of Linear Colors.
This DBA_Items asset is assigned to a variable in my custom BP_GameInstance, it is the default value for this variable. It is here so I can access these values from where ever in-game easily (via some helper functions). This DBA_Items data asset NEVER has values set on it at runtime.

Here’s an image showing the relationships to paint a clearer picture:

More often than not, for some reason I can’t figure out, sometimes when I close the editor and restart this “Items” map/array gets reset to have zero items in it. But it is ONLY this array/map. The Array of a built-in struct type (like Color) never gets reset. So I assume it’s something with my Struct?

Does anyone have any idea why this might happen, and what I can do to resolve it? I’m tired of having to re-enter all this data again and again because it’s getting lost. Is my data asset not set up properly? Is this not how you use data assets? Is there some checkbox I need to check on my struct?

I’ve recently changed my Items array to be a Map, so I can index it via an Enum instead of an integer, and now it seems every time I add a value to this Enum, the Map using this Enum detects there’s a change, and instead of gracefully updating it’s like it triggers a reset for the entire map? Like it says “Oh the data in this map is currently using E_Items Version 1.2, but we just made a change and now E_Items has been updated to Version 1.3, so that data that’s in the map currently is invalid so lets just set it to NOTHING!”. It’s frustrating.

Here is a video showing the Array, restarting the editor, and the array now being empty.

Pls help me

So the problem appears to be with changing any data in the Enum/Structure. Unreal thinks it’s a different new data type when just adding a new enum entry or changing the structure to have another variable, and so the previous data that was in that list is considered “invalid”.

For a Map of type [Enum, Structure], I found that if I:

  1. Open my Enum to add a new entry, save it
  2. Open my DataAsset, File > Refresh Nodes. Compile. Save.
  3. Restart the editor (which actually crashes as it closes now but doesn’t cause any apparent issues lol)
  4. Reopen, data still there!

Following these steps has consistently worked on a handful of tests in a row. I assume if I edit the Structure following the same steps should help too.

Maybe fixed?