Data Assets losing References when Unreal Restarts

So I have PDA 1 (Race) which contains references to another PDA type (Body part), and on restart, a section of references are lost within the Body Part assets that are contained within the Race Asset. Basically it looks like this - A ‘race’ data asset, which is used to set values in the character creator system I have, references data of the second PDA type - body part. And mesh data is lost (on Unreal engine restart) in the body part Data Assets - not texture data however, strangely enough.


At construct for my character creator actor, I get a default race data asset to initiate the data driven creator system, and that default race data asset is brought into the BP actor with an Asset Registry search, since I have noticed data assets have issues when being referenced by default in the editor. Inside the race data, there is body part data (mesh and textures), which are used to set skel mesh component values, as well as texture parameters inside a dynamic material instance on those skel mesh components. Basically I have a race data that says here are the default body parts of that race (arms legs etc), and the body part data is simply the enum type + asset references to construct it (mesh + textures).


So for whatever reason I am losing references, and I haven’t been able to find any solutions from searches on this forum or reddit.

Honestly I have no idea how these PDA work, why my pick ups can reference specific Data Assets as a default value of a ‘X data asset’ type variable, and have no issue, but if I reference something like Race data in a character, it wipes a variety of the data out associated with it on editor restart.

Are there known conventions for how to deal with data asset references in unreal engine? Thanks in advance for any help :slight_smile:

So I have found a solution, and I’ll describe this here in case anyone ends up in the same position as me.

I had to disconnect the body part make array (which contained a reference to the Race data asset type, which had default values of the body part data, and for some reason, when those were connected, no data could be changed in the body part data assets that were referenced by default in the default race.

So to fix it I had to

  1. Disconnect the code that dealt with adding the body part data object references into a body part data asset array

  2. Refresh all nodes, close Unreal

  3. Reopen Unreal, set all data in body part data assets

  4. Save close and reopen unreal

  5. Check to see if the body part data is present, if yes, reconnect the array, save close and reopen

  6. if the data is still present, all is good.

I am thinking that if a data asset is referenced, even as a default value by a referenceless owning data asset, Unreal fails to update the data probably because there is a conflict of that instance of referenced data and the source that you are trying to update. Be sure to setup and save any data assets that will be used as default, before they are used in anything hardcoded.

Hope this helps someone because it took a couple hours from me.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.