Can I replace DefaultSceneRoot in blueprint subclasses?

Is there something preventing you from replacing it?

Yes, unreal engine doesn’t allow it to be replaced in subclasses as far as I can tell.

I have a fairly simple question: can I replace DefaultSceneRoot in subclasses? If not, it seems like inheritance is really of limited utility for me. I have a base class I’d like my projectiles, character, and props in my scene to share, but I believe my collision is messed up because I am unable to modify the root component. I can’t simply set them all to have the same root component, as some need things like a capsule, others need a static mesh, and others need a skeletal mesh.

Am I forced to just duplicate code across classes and keep it in alignment?

This question seems very similar, and I see the author didn’t get much of an answer. It’s from 4 years ago though, so I’m hoping something may have changed or people have other ideas.

In C++, in your child actor classes, you can set DefaultRoot in constructor of child actor class.

DefaultRoot = CreateDefaultSubobject<UCapsuleComponent>("DefaultRootComponent");

If child class is a blueprint class you can do this in construction script of the child actor.

This is my parent blueprint with capsule collision as root component

This is my child blueprint with box collision as root component

I only problem I see is in details inspector, you dont see capsule or box collision properties. You would only see the scene component properties.

If you do this through C++, then you will get to see the properties.

It doesn’t seem to actually modify the DefaultSceneRoot, as far as I can tell. I tried doing this, and after spawning, the object still has the same hierarchy, with DefaultSceneRoot as the root.

Facing same issue, any solutions?