# Restructure code: Best way to move "stuff" from parent into child class?

**URL:** <https://forums.unrealengine.com/t/restructure-code-best-way-to-move-stuff-from-parent-into-child-class/617398>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE5-0, Blueprint, question\
**Created:** [July 29, 2022, 8:53pm UTC](https://forums.unrealengine.com/t/restructure-code-best-way-to-move-stuff-from-parent-into-child-class/617398 "2022-07-29T20:53:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gedinixan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gedinixan](https://forums.unrealengine.com/u/Gedinixan)\
**Post date:** [July 29, 2022, 8:53pm UTC](https://forums.unrealengine.com/t/restructure-code-best-way-to-move-stuff-from-parent-into-child-class/617398/1 "2022-07-29T20:53:15Z")

</div>

I want to restructure some of my Blueprints. Over time I’ve put to much into my “PlayerCharacterBase” Blueprint. Now I like to create some specialized child classes and put part of my code and components only into those childs. What is the best way to do this? Just copy and paste and make sure everything is still correctly connected? Or is there a better way? Some “Duplicate this part from the parent to child” or something?

---

<div class="post-metadata">

**Author:** ![CtnDev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ctndev/32/1133321_2.png) [@CtnDev](https://forums.unrealengine.com/u/CtnDev)\
**Post date:** [July 29, 2022, 9:17pm UTC](https://forums.unrealengine.com/t/restructure-code-best-way-to-move-stuff-from-parent-into-child-class/617398/2 "2022-07-29T21:17:25Z")

</div>

Generally playercharacter should just include basic stuff, like movement and so on. Other than those you should use UActorComponents like inventory, interaction, grabber etc etc.  
And then you can add those components freely to the actors for reuse.

---

<div class="post-metadata">

**Author:** ![eblade](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eblade](https://forums.unrealengine.com/u/eblade)\
**Post date:** [July 29, 2022, 9:31pm UTC](https://forums.unrealengine.com/t/restructure-code-best-way-to-move-stuff-from-parent-into-child-class/617398/3 "2022-07-29T21:31:27Z")

</div>

> [@Gedinixan](#):
>
> What is the best way to do this? Just copy and paste and make sure everything is still correctly connected? Or is there a better way?

I think you’ve pretty much got it.

> [@CtnDev](#):
>
> Generally playercharacter should just include basic stuff, like movement and so on. Other than those you should use UActorComponents like inventory, interaction, grabber etc etc.

well, all depends on what you’re doing. Components have their own issues.

---

<div class="post-metadata">

**Author:** ![CtnDev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ctndev/32/1133321_2.png) [@CtnDev](https://forums.unrealengine.com/u/CtnDev)\
**Post date:** [July 30, 2022, 8:59pm UTC](https://forums.unrealengine.com/t/restructure-code-best-way-to-move-stuff-from-parent-into-child-class/617398/4 "2022-07-30T20:59:56Z")

</div>

Its normal to disagree. But it wouldnt be much constructive comment unless you have an advice for all of us. Please elaborate more on “depends”
