Set Class Defaults via C++

Hi there everyone,

I’m tinkering with the new Editor Utility Widget and for the tool I’m trying to make I need to be able to save the Default Class Variables to update an array that the user would modify via the widget.

So I’m trying to see about creating a C++ Blueprint Library that would add a node for setting the Class Defaults similar to the Get Class Defaults node but can’t find any information about how to do this.

I just want to be able to override class default variables so that I can have the data self contained in a single asset instead of having to split it into multiple assets like datatables and the like.

Defaults are stored in class default object (CDO) and you can get it via UClass:

It the same thing that Get Class Defaults returns

Wouldn’t this just get the defaults? I need to be able to set them

Set varibles in CDO

Uh, yeah, the question is how

2 Likes