/Engine/Source/Runtime/Engine/Classes/GameFramework/Actor.h
Get all components derived from specified ComponentClass and fill in the OutComponents array with the result. It's recommended to use TArrays with a TInlineAllocator to potentially avoid memory allocation costs.TInlineComponentArrayis defined to make this easier, for example: { TInlineComponentArrayPrimComponents(Actor); }
template<class AllocatorType, class ComponentType> void GetComponents ( [TSubclassOf](API\Runtime\CoreUObject\Templates\TSubclassOf)< [UActorComponent](API\Runtime\Engine\Components\UActorComponent) > ComponentClass, [TArray](API\Runtime\Core\Containers\TArray)< ComponentType *, AllocatorType > & OutComponents, bool bIncludeFromChildActors ) const