I want to be able to do something according to the “idea” in this code snipet (that doesn’t work).
TArray<UObject*> UFuzzyFetcherLibrary::getAllMatchingObjects(const FString& json)
{
TArray<UObject*> result;
static ConstructorHelpers::FClassFinder<UObject> theClass(TEXT("Class'/Script/PluginProject.MyObject'"));
if (theClass.Class) {
UObject* classPointer = (UObject*)theClass.Class.GetDefaultObject();
result.Push(classPointer);
}
return result;
}
Later the string will be provided from an external source. The objects are not necessarly BPs and if possible I would like to be able to keep it that way. Currently the Array contains zero object when i use this function from blueprints, probably due to the “ClassFinder” not finding the class.