# Editing Hierarchy of an Actor with Python

**URL:** <https://forums.unrealengine.com/t/editing-hierarchy-of-an-actor-with-python/2461660>\
**Category:** Programming & Scripting\
**Tags:** Python, actor, unreal-engine, Scripting, Components, question\
**Created:** [April 17, 2025, 4:02pm UTC](https://forums.unrealengine.com/t/editing-hierarchy-of-an-actor-with-python/2461660 "2025-04-17T16:02:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![KnartGames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KnartGames](https://forums.unrealengine.com/u/KnartGames)\
**Post date:** [April 17, 2025, 4:02pm UTC](https://forums.unrealengine.com/t/editing-hierarchy-of-an-actor-with-python/2461660/1 "2025-04-17T16:02:06Z")

</div>

So I am looking to add multiple custom scene components to an actor which has a hierarchy. It may look something like this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/b/5/4b525bd2e037c4d42c06edeb64952cd1d4153b67.png)  
but extended to perhaps hundreds of meshes. The question I have is how would I, 1. Find all static meshes in the hierarchy, and 2. Attach a scene component to them? I have been trying to find a python solution but may pivot to blueprint widget soon if it could be easier as the “add component” functionality in python seems buggy or nonexistent.

Thanks for your time!
