Get All Components of an Actor

Hello !

I want to do something that seemed simple at first, but I can’t find how to do it.
I have a simple actor hierarchy like this :

Capture.PNG
When this actor is overlapped by another, I want to retrieve the list of all his Actor Components (in my case, the AC_FireListener), from the overlapping actor which has the reference to my WoodCrate now.

Do you know any way to do it ? I already tried to get all the Children of the root component, which doesn’t work (AC isn’t a children), and I don’t want to search my Actor Component by class (if possible), because it’s not very scalable (maybe I’ll have to search for other Actor Components in the future).

If you have an idea, you are my hero !

Bye !

Why don’t you use “Get Component by Class” and select AC_FireListener?

a1.png

In C++ this is an easy task ( AActor::GetComponents ), I found this old post because I wasn’t able to find the function in BP (because it’s not exposed).

The workaround is to use the function suggested by @EvilCleric, but using ActorComponent as class (as it is the parent class from which all other components inherit from).

image