/Engine/Source/Runtime/NavigationSystem/Public/NavigationSystem.h
A helper function that gathers all actors attached to RootActor and fetches them back. The function does consider multi-level attachments.
the number of unique attached actors
static int32 GetAllAttachedActors ( const [AActor](API\Runtime\Engine\GameFramework\AActor) & RootActor, [TArray](API\Runtime\Core\Containers\TArray)< [AActor](API\Runtime\Engine\GameFramework\AActor) * > & OutAttachedActors )