Get children of child actor component

Hey there,
I made a blueprint that contains child actor components that are arranged in a certain hierarchy. Now, from one of the child actor components script I would like to get its child from this hierarchy. is it possible?
I tried get child component but it gives me just the components of the child actor component, not its child.
hope you can understand what I mean.

thanks all!

David

Use the MyChildActorComponent->GetChildActor to get the child actor

Thanks for the superfast reply!
Maybe I dont understand that properly, but when I use the “get child actor” I will get the actual actor that is contained in the child actor component:
MyActor.MyChildActorComponent => MyChildActorComponent

for illustration Im posting a screenshot
thanks!

202276-child.png

ah ok.
Use the GetChildrenComponents() on 5_522_BP1. This returns an array of child components of type scene component. From there you have to cast the scene components to child actor components.

If you only have one child component you can simply use the first entry of that array.

OK, based on your help I managed to do it finally:
I needed to go up two levels to reach the top actor with “get parent components” and “get 1” from array (I started from a child component of the childactorcomponent)
then “get children components”, loop that and in the loop I needed to “cast to childactorcomponent” to be able to “get child actor” from that… that was what I was missing

thanks a lot!

you are welcome