# Proper way to change an actor's root in the editor?

**URL:** <https://forums.unrealengine.com/t/proper-way-to-change-an-actors-root-in-the-editor/468466>\
**Category:** Pipeline & Plugins\
**Tags:** actor, root-component, unreal-engine, editor, CPP, question\
**Created:** [July 21, 2020, 2:41pm UTC](https://forums.unrealengine.com/t/proper-way-to-change-an-actors-root-in-the-editor/468466 "2020-07-21T14:41:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_84af53a5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_84af53a5](https://forums.unrealengine.com/u/anonymous_user_84af53a5)\
**Post date:** [July 21, 2020, 2:41pm UTC](https://forums.unrealengine.com/t/proper-way-to-change-an-actors-root-in-the-editor/468466/1 "2020-07-21T14:41:38Z")

</div>

Hi everyone!

What would be the proper way to change an actor’s root in the editor by changing a property?

I am trying to have an actor that has a UStaticMesh as it’s root component and then, by changing a boolean and using PostEditChangeProperty I want to replace the UStaticMesh with a UDestructibleComponent.

It kind of works, the problem is that when I compile a child blueprint the added components get erased. Meaning that I can make changes to the instances, but not to the actual Blueprints.
