Ok I think I have this working with the following code:
Header:
UFUNCTION(BlueprintPure, BlueprintCallable, Category = "Object")
static UObject* GetDefaultObject(TSubclassOf<UObject> ObjectClass);
CPP:
UObject* USetiBlueprintLibrary::GetDefaultObject(TSubclassOf<UObject> ObjectClass)
{
return ObjectClass.GetDefaultObject();
}
I say think because yes it does appear to be working, but for some odd reason I can’t actually save my Blueprint now due some very odd error.
Can't save G:/Documents//Development/seti_prototype_1/Content/Blueprints/Items/ItemManager.uasset: Graph is linked to private object(s) in an external package.
External Object(s):
/Engine/Transient
Try to find the chain of references to that object (may take some time)?