Download

How do I create an Asset in the content browser from a collection of Actors and their Components?

I have a plugin that creates a mechanism, i.e. it creates a bunch of StaticMesh assets, a collection of Actors, and populates (some of) those actors with StaticMeshComponents referencing those newly created StaticMeshes and some other Components as well. The actors are attached to an otherwise empty root Actor that is given a descriptive name. In this way I can create complicated mechanism easily and get a nice “handle” to it that I can use to move the mechanism around the scene. However, creating all the objects takes a bit of time, and also I often want to create multiple copies of the same mechanism and in those cases I don’t want to create another instance of the same StaticMesh asset but instead reference the one already created.

Is there a way to save a root Actor, all Actors attached to it, and all Components within those attached Actors to something within the Content Browser that can be dragged into the level multiple times, and dragged into multiple levels? Preferable also exportable so it can be used in other projects.

I have found the two “Convert to Blueprint” variants in the toolbar but those seem to throw away all the Actors, which is not what I want.

I have also found posts on this forum that suggests creating an Actor blueprint that creates the attached actors in it’s constructions script, but I don’t understand how to generate that script automatically from the current selection.