Create Child Blueprint Class from Editor Utility Blueprint

Hi all,

I am trying to create a tool to simplify the work flow for the artist (i.e. not very good with UE).

Generally speaking, the conventional work flow is very simple:

  • I have an Actor blueprint that serves as a template.
  • I “Create Child Blueprint Class” from the template, edit some variables, put in a skeletal mesh and we have a Variant A.
  • I “Create Child Blueprint Class” from the template, edit some variables, put in another skeletal mesh and we have a Variant B… so on and so forth.

So, I am trying to achieve with Editor Utility Blueprint is to right click the different skeletal mesh for example, click on the custom function provided by the Editor Utility Blueprint, fetch the template and “Create Child Blueprint Class” from that template to create a new variant.

My current problem is that I can’t find any node or way to “Create Child Blueprint Class” from Editor Utility Blueprint. Is it possible?

Best,

I got it, though you’ll need to work with C++

FString PackageName = Path + FileName;
	UPackage* Package = CreatePackage(*PackageName);

	// Create and init a new Blueprint
	UBlueprint* Blueprint = FKismetEditorUtilities::CreateBlueprint(ParentClass, Package, *FileName, BPTYPE_Normal, UBlueprint::StaticClass(), UBlueprintGeneratedClass::StaticClass());

	if (Blueprint)
	{
		// Notify the asset registry
		FAssetRegistryModule::AssetCreated(Blueprint);
	
		// Mark the package dirty...
		Package->MarkPackageDirty();
	}
3 Likes

Very usefull, thank you