Make the engine load bp classes dynamically

To properly handle some references, I need to load certain blueprint classes first.

How do I load a (blueprint) class in C++?
I tried getting all UBlueprint objects via AssetRegistry, but then I don’t really know what to do with those objects.

Are they all actor blueprints ? Or a mix of UI/ Actor/ Objects etc.?

Let’s say actor blueprints.

Do you mean you need to get a reference to some blueprint classes from a custom C++ class you made or do you actually want to change the way the editor / runtime initializes?

Okay so I got the following problem:

When recompiling a C++ class, the Blueprints that reference said C++ class and make use of the variables of the C++ class get broken upon hot reloading, then playing. It lists the “property missing” error.

It is fixable by recompiling the affected blueprints (no error, just a manual recompile) or restarting the engine. I tested around and it seems like this is preventable by simply opening up the blueprints ahead of the recompilation process (and therefore “loading” beforehand). Basically, it seems like the hot reload breaks the C++ references of Blueprints if the engine hasn’t loaded them before.

So the idea is that when I recompile, the Blueprints referencing my C++ classes should be loaded manually beforehand. I have tested a couple ways, but no luck yet.