# How can I replace a SceneComponent with another and keep the same name

**URL:** <https://forums.unrealengine.com/t/how-can-i-replace-a-scenecomponent-with-another-and-keep-the-same-name/2266112>\
**Category:** C++\
**Tags:** unreal-engine, question\
**Created:** [January 8, 2025, 2:11pm UTC](https://forums.unrealengine.com/t/how-can-i-replace-a-scenecomponent-with-another-and-keep-the-same-name/2266112 "2025-01-08T14:11:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JAuzanneau](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jauzanneau/32/978097_2.png) [@JAuzanneau](https://forums.unrealengine.com/u/JAuzanneau)\
**Post date:** [January 8, 2025, 2:11pm UTC](https://forums.unrealengine.com/t/how-can-i-replace-a-scenecomponent-with-another-and-keep-the-same-name/2266112/1 "2025-01-08T14:11:42Z")

</div>

Here is what I’m trying to achieve:

```auto
Parent
   Component < Replace with another Component (subclass of USceneComponent)
      Child1
      Child2

```

What is the correct way to destroy the old component, and create a new one with the same name?

---

<div class="post-metadata">

**Author:** ![JAuzanneau](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jauzanneau/32/978097_2.png) [@JAuzanneau](https://forums.unrealengine.com/u/JAuzanneau)\
**Post date:** [January 9, 2025, 1:22pm UTC](https://forums.unrealengine.com/t/how-can-i-replace-a-scenecomponent-with-another-and-keep-the-same-name/2266112/2 "2025-01-09T13:22:17Z")

</div>

So far, I’ve tried:

- Creating the custom component, setting it up then destroy the old one.
- Renaming the old component, creating the custom one, setting it up then destroy the old one.
- Destroying the old component, create the new one, and setting it up.
- Renaming the old component, destroying it, creating the new component and setting it up.

All of the above crashed (fatal log: “Objects have the same fully qualified name but different paths” (UObjectGlobals.cpp, line 3401)).

To me, it looks like destroying the component does not free up its name. If so, how can I free the name up?
