How to keep / save "data asset" datas (or is this a bug?)

Hello ! i’m using the “data asset” for the first time, and it seem to lose reference when i’m restarting the editor (not everytime).

Here my case :

I’m have a Class “MoveData” with parent “Primary Data Asset”

One of the Variable of the “MoveData” is a structure “Move combo” with 4 variable of type “MoveData”
(so, each movedata is referencing up to 4 other movedata)
image

I use it to have each attack of my player to be able to combo on 4 other moves. (so, combo 1_1 have a reference to Combo1_2 and to GS_1, 2 other movedata)

and when i restart the editor, the move combo are something just back to “none”

is this a bug ? Is there a way to avoid the issue ? Should i stock my combo data on another way ?

2 Likes

is there any other basic tools to save data ? (BP)

1 Like

Hi there,

You should try adding these class property on the children data assets.
UCLASS(DefaultToInstanced, EditInlineNew)

It did the trick for us, adding the ability to “add” the subelement in the details panel, as well as serializing it correctly.

Cheers,

Hi, I had the same problem as you, some of the data assets kept reverting to their default values when the editor was restarted (I should mention that I only do blueprints).

After searching, I think I have something. It seems that the problem occurs when you put a Data Asset as a variable within another Data Asset and the first Data Asset is referenced several times in this way.

My example: I have objects that I would like to drop resources when we destroy them. In my case, I would like my resources to be Data Assets. A DA_Metal, DA_Glass, DA_Plastic, etc… which all inherit a dedicated PrimaryDataAsset (PDA_Ressource). In these I have data that is specific to each type of resource (I won’t go into detail).

Then, for each destructible object, I make a DataAsset with its own PrimaryDataAsset too (PDA_Object). So for two objects, I have a Data Asset “Object1” and a Data Asset “Object2”. In the latter, I have a map variable named “resources” with the type of the resource as input (PDA_Ressource) and an integer as value. I come to choose the type of the resource and the amount of the resource that the object leaves on the ground.

Well, from then on, I noticed that my resources in the form of Data Asset had their values reset to zero on restart if and only if the Data Asset was referenced in both objects at the same time. If it was referenced only once or not at all, the values were retained.

My exploration of the problem ends here. I will just review the organisation of my assets a bit. Hopefully this will have helped you. :slight_smile:

1 Like

Did you ever find a solution to this? Looks like it’s still in and the bug makes it hard to use the architecture I planned.

Same issue in UE 5.2. The weird part is that unreal started doing it only now, even though I switched version 2 months ago

In UE 5.3 and and have the same issue using the MassAI plugin. Let me know if you find any solutions.

Same here. Very annoying Bug. I hope this will be fixed soon

The assigned variable was marked as deprecated in my case. After unchecking that it seemed to work again.