Counting the Number of nested Actors


So i’m trying to get the number of nested Actors in a “node”, get attached actors gives me the number of the 1st generation of nodes instead of all of it, so i tried to call it recursively for each node nested to add them all up in an integer. Now this doesn’t work and breaks as soon as it encounters the first node without any nested node, i tried with that branch to no effect at all.

EDIT: so kinda solved, copy and paste instead of using a recursive call, but this works for a finite number of nested generations, i dont get why it doesnt work otherwise

You could try to use a recursive function:

In the UE5:

My Products

why does my pic n1 doesn’t work? its a recursive custom event, is there any difference with a fuction other than “keeping things in order”?
So basically pass to unreal 5 and the issue is no more, solved i guess.

It works for me:

1 Like