I am looking for a way / example on how to generate Blueprint programmatically. Basically I would like to create a Blueprint object and attach some components to it (instanced static mesh components and static mesh components) and save the generated Blueprint / have it available in the asset browser.
Hello. Yes! Create Package; Create Actor and attach all your components to it. Then use FKismetEditorUtilities::CreateBlueprintFromActor on your created actor. Then delete actor. We did it this way. Let me know if you find a better one. Hope this helps!!
ttvd, nice! this is a bit dirty due to actor create/delete, but it is much simpler than working with FKismetEditorUtilities::CreateBlueprint. Thanks a lot, youâve been a great help.
ttvd, nice! this is a bit dirty due to actor create/delete, but it is much simpler than working with FKismetEditorUtilities::CreateBlueprint. Thanks a lot, youâve been a great help.
Basically you are creating your actor within a transient package (2nd null parameter to ConstructObject); you need to create it within the current level for this to work, I think. See 2nd link above.