Get Blueprint class by String in C++

Update to the update :slight_smile:

To get rid of the intelisense error you can change

#include "CoreMinimal.h"

to

#include "EngineMinimal.h"

Then you can just use:

UClass* Result = FindObject<UClass>(ANY_PACKAGE, *ClassName)

Source: Issues with ANY_PACKAGE used in FindObject - Programming & Scripting - Unreal Engine Forums

Also note that if the engine hasn’t loaded the class, this might not find it. In that case you will want to use this to load the class:

UClass* Result = StaticLoadClass(UObject::StaticClass(), nullptr, *ClassName, nullptr, LOAD_None, nullptr);

Source: An issue with runtime saving/loading of Blueprint Classes - Blueprint - Unreal Engine Forums