Hi there,
I’m loading content by adding a content plug-in AFTER the actual runtime has been started. How can I spawn an actor of a new class from that plug-in knowing only its name?
Any help is highly appreciated.
Hi there,
I’m loading content by adding a content plug-in AFTER the actual runtime has been started. How can I spawn an actor of a new class from that plug-in knowing only its name?
Any help is highly appreciated.
Hey @Matt_F.Judge,
Are you doing so via blueprints? If so, you should be able to use spawn actor from class.
Let me know if this works for you!
Since the class is not known prior to loading the plug-in that couldn’t work.
But I found a solution that uses a function that creates the actual class name and returns it.
UClass* UUEPlugin_LoadNewContentBPLibrary::UEPlugin_GetClassFromAssetData(const FAssetData& InAssetData)
{
FString ObjPath = InAssetData.GetObjectPathString().Append("_C");
return StaticLoadClass(UObject::StaticClass(), NULL, *ObjPath, NULL, LOAD_None, NULL);
}
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.