How to update a Class Default Object (CDO) manually?

Recently I have attempted to store certain default variables in a UDataTable, which allows quick edits, as it doesn’t require you to push changes to a Blueprint.

However, certain Widgets require a variable in said data table (Assume something simple like a string). An instance of said Blueprint is not available during the lifetime of the widget, so I reckon I would get the class defaults instead (As the UCLASS variable is accessible), which exposes the data table.

Sadly, the Class Default Object (CDO) is not updated, as the table is set OnConstruction. I have been looking into a way to update it manually. Although I can’t find anything in the API.


This obviously reeks heavily of an XY-problem, though simply see this as an example use case. Any suggestion is much appreciated!

I’ve found that doing something similar to a CDO works well: you create a dummy instance, unused by logic, get the variable required, and destroy the instance right after. Depending on your object, this operation isn’t that heavy. Though it definitely shouldn’t be done each frame.

Did you ever find a solution/workaround to this? I am basically struggling with the exact same thing right now

It is as I said, it’s defo an XY-issue, in short, if you’re looking for this solution, you’re likely on the wrong track, and should probably rethink your approach. As for the solution, I honestly don’t remember, it has been a while.