I’m trying to set up a hierarchy of blueprints, where I have a parent blueprint behaviour (event graph, properties), and then child blueprints that inherit that behaviour into specific types of objects.
These parent blueprints are only there to allow their behaviour graphs and properties to be inherited, they have no mesh component and are not designed to be created on their own.
However, every Blueprint needs to have a DefaultSceneRoot component.
Now, my problem is that if I create a specific child blueprint and want to give it a static mesh component, I need to create that as a child of the DefaultSceneRoot - I cannot replace the inherited scene root component.
Adding physics simulation to the static mesh component makes it separate from the root of the BP. That means that moving the object no longer affects the physics-simulated component (it gets left behind), and that I can’t iterate through the BP’s components any more (which I need to be able to do for a visual effect.)
What I really want to do is replace that useless DefaultSceneRoot that I’ve inherited from the script-only ancestor blueprints, so that the root of my new blueprint is the physics-enabled static mesh, but there doesn’t seem to be any way to do that.
The only solution I can think of is to set up an empty static mesh on the parent BP, and then to use a combination of editable properties and a construction script to allow the actual mesh to use and whether or not physics simulation is enabled to be set on the children through properties. That’d be possible, but seems like an awkward and somewhat hacky workaround.
Maybe the whole thing can be overcome by using a C++ class instead of a blueprint as an ancestor, though I’d rather not do that if I don’t have to, especially when I already have the system working through Blueprints.
Does anyone have any suggestions on what the proper way to do this kind of thing is?