# wrap actors of the same type of class in a common actor class

**URL:** <https://forums.unrealengine.com/t/wrap-actors-of-the-same-type-of-class-in-a-common-actor-class/2465581>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [April 20, 2025, 2:58am UTC](https://forums.unrealengine.com/t/wrap-actors-of-the-same-type-of-class-in-a-common-actor-class/2465581 "2025-04-20T02:58:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![barbrian0723](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@barbrian0723](https://forums.unrealengine.com/u/barbrian0723)\
**Post date:** [April 20, 2025, 2:58am UTC](https://forums.unrealengine.com/t/wrap-actors-of-the-same-type-of-class-in-a-common-actor-class/2465581/1 "2025-04-20T02:58:00Z")

</div>

hi

is it possible, or what is the best way, to wrap unique / different actors of the same type or class in a common actor class

say you have x actors that differ but share common properties  
being able to access them as the same actor class has the benefit of easily getting to the shared properties without first having to cast to individual classes because they have a similar class they share that contain the necessary information that would eliminate first casting to individual classes

so i guess to implement this one can have a top level actor blueprint that contain the common properties as variables, and then have the top level blueprint spawn the corresponding (sub) actor based on its unique type

is there a better way to do this

thanks

---

<div class="post-metadata">

**Author:** ![Auran131](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Auran131](https://forums.unrealengine.com/u/Auran131)\
**Post date:** [April 20, 2025, 3:54am UTC](https://forums.unrealengine.com/t/wrap-actors-of-the-same-type-of-class-in-a-common-actor-class/2465581/2 "2025-04-20T03:54:41Z")

</div>

i mean that’s what inheritance is, but it may be better to use ActorComponents.

i say this because some class inheritance cant be changed, ie Character

---

<div class="post-metadata">

**Author:** ![barbrian0723](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@barbrian0723](https://forums.unrealengine.com/u/barbrian0723)\
**Post date:** [April 20, 2025, 3:57am UTC](https://forums.unrealengine.com/t/wrap-actors-of-the-same-type-of-class-in-a-common-actor-class/2465581/3 "2025-04-20T03:57:21Z")

</div>

ok can you perhaps quickly note how you inherent or create the inheritance

---

<div class="post-metadata">

**Author:** ![Auran131](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Auran131](https://forums.unrealengine.com/u/Auran131)\
**Post date:** [April 20, 2025, 4:01am UTC](https://forums.unrealengine.com/t/wrap-actors-of-the-same-type-of-class-in-a-common-actor-class/2465581/4 "2025-04-20T04:01:26Z")

</div>

create your actor class, lets say MyActor  
then create child actor classes (right click on it in editor and CreateChildClass) from that MyActorA, MyActorB

when you spawn a child class (MyActorA) save its return value as the parent (MyActor) to only have the common methods.

---

<div class="post-metadata">

**Author:** ![barbrian0723](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@barbrian0723](https://forums.unrealengine.com/u/barbrian0723)\
**Post date:** [April 20, 2025, 4:06am UTC](https://forums.unrealengine.com/t/wrap-actors-of-the-same-type-of-class-in-a-common-actor-class/2465581/5 "2025-04-20T04:06:34Z")

</div>

thanks

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [May 20, 2025, 4:06am UTC](https://forums.unrealengine.com/t/wrap-actors-of-the-same-type-of-class-in-a-common-actor-class/2465581/6 "2025-05-20T04:06:57Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
