How to edit a blueprint file's data with C++?

My game uses Blueprint files that retrieve new values from JSON at runtime. I would like to edit the blueprints so their default values match the values retrieved from JSON.

Is there a way to edit blueprint files on disk via C++? I have managed to use the IFIleManager class to iterate through all files in a directory, but I have two problems.

  1. Even if I have found a UAsset file’s path, I can’t seem to load it into memory. StaticLoadClass and StaticLoadObject always return null. I’m only using the file path and not including the internal package name because I don’t know how to get the internal package name.
  2. Is it even possible to edit a blueprint’s data via a C++ commandlet? Searching brings up nothing.

Well, even i’m not sure that i understood your question right:
I can say for the records, there is no need to overwrite the blueprints on disk. You can just write a base C++ class and derive(Relevant documentation) your blueprint class from that class;.

Inside of that C++ class you can create a initialize function or just use the begin play or the constructor to read the values from the .json file and set it properties.

I’m aware that, it’s been 2 years since the you opened this question. But, i wanted to add this to here for the others that searching something like this and came across this question.