# Excluding base class when using "TSubClassOf" on custom UFUNCTION

**URL:** <https://forums.unrealengine.com/t/excluding-base-class-when-using-tsubclassof-on-custom-ufunction/414985>\
**Category:** Blueprint\
**Tags:** ufunction, tsubclassof, unreal-engine, Blueprint, question\
**Created:** [January 19, 2018, 3:41pm UTC](https://forums.unrealengine.com/t/excluding-base-class-when-using-tsubclassof-on-custom-ufunction/414985 "2018-01-19T15:41:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mewster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mewster](https://forums.unrealengine.com/u/Mewster)\
**Post date:** [January 19, 2018, 3:41pm UTC](https://forums.unrealengine.com/t/excluding-base-class-when-using-tsubclassof-on-custom-ufunction/414985/1 "2018-01-19T15:41:56Z")

</div>

I have a UFUNCTION that finds the first component subclass of an ActorComponent of an actor

```
UFUNCTION(BlueprintCallable)
static UActorComponent* GetFirstComponentByClass(AActor* Actor, TSubclassOf<UActorComponent> ComponentClass);

```

When using this node, in the “ComponentClass” dropdown menu I can choose the “ActorComponent” class, but it’s obviously too much generic; since I can’t mark the UActorComponent class as abstract, is there some other way to exclude the “ActorComponent” base class from the menu?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![xlar8or](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xlar8or/32/710746_2.png) [@xlar8or](https://forums.unrealengine.com/u/xlar8or)\
**Post date:** [January 20, 2018, 11:44am UTC](https://forums.unrealengine.com/t/excluding-base-class-when-using-tsubclassof-on-custom-ufunction/414985/2 "2018-01-20T11:44:25Z")

</div>

Hey there, do you want to be able to select all of the childs of Actor Component or just a specific piece of the hierarchy? If that’s the case you can set the TSubclass Of with whatever point in the hierarchy.

---

<div class="post-metadata">

**Author:** ![Mewster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mewster](https://forums.unrealengine.com/u/Mewster)\
**Post date:** [January 20, 2018, 12:34pm UTC](https://forums.unrealengine.com/t/excluding-base-class-when-using-tsubclassof-on-custom-ufunction/414985/3 "2018-01-20T12:34:55Z")

</div>

My aim is to select all of the children of Actor Component

---

<div class="post-metadata">

**Author:** ![xlar8or](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xlar8or/32/710746_2.png) [@xlar8or](https://forums.unrealengine.com/u/xlar8or)\
**Post date:** [January 20, 2018, 12:42pm UTC](https://forums.unrealengine.com/t/excluding-base-class-when-using-tsubclassof-on-custom-ufunction/414985/4 "2018-01-20T12:42:47Z")

</div>

Then i believe there is not other way if you want to use TSubclassOf, at least that i know of.
