/Engine/Source/Editor/UnrealEd/Public/Kismet2/KismetEditorUtilities.h
Given an array of Actors, identifies which of those Actors are roots of attachment hierarchies (and implicitly which are attached to another actor in the array) Optionally will also populate an attachment map that indicates which actors in the array are attached to each other actor (potentially indirectly) For example if A is attached to B is attached to C and E is attached to D, and A, C, and E are in the Actors array, C and E will be in the RootActors, and the AttachmentMap will indicate that C has A as an attachment
static void IdentifyRootActors ( const [TArray](API\Runtime\Core\Containers\TArray)< [AActor](API\Runtime\Engine\GameFramework\AActor) * > & Actors, [TArray](API\Runtime\Core\Containers\TArray)< [AActor](API\Runtime\Engine\GameFramework\AActor) * > & RootActors, [TMap](API\Runtime\Core\Containers\TMap)< [AActor](API\Runtime\Engine\GameFramework\AActor) *, [TArray](API\Runtime\Core\Containers\TArray)< [AActor](API\Runtime\Engine\GameFramework\AActor) * >> * AttachmentMap )