How to edit and save an existing Data Table .uasset with C++?

Dear community! Is it possible to take an existing Data Table from the content browser, run some operations on it to change the data, and then save it back into the save content browser asset?

I am trying to do this in C++, all in-Editor (not in packaged build). If the editor Python scripting is better suited, please let me know.

It seems like loading the data table from a Content Browser asset (UPackage?) can be done with LoadObject. Then, when I have a UDataTable*, I can add or edit rows easily with the provided UDataTable::AddRow and other functions.

The issue then is, how do I save a UDataTable back into the content browser .uasset?* I assume there is a general way to do this for any object type?

I have only found the UPackage::SavePackage function, the description of which says “Save one specific object (along with any objects it references contained within the same Outer) into an Unreal package.” Does this function only save new assets? Or is it possible to overwrite the existing one? And what do all these input variables in the signature do – if this is indeed the function to use, what does it expect as TopLevelFlags, TargetPlatform, etc?

2 Likes

Would like to know how to do this as well please.

Thanks!

1 Like

Also interested.