Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/GameFramework > API/Runtime/Engine/GameFramework/AActor > API/Runtime/Engine/GameFramework/AActor/GetComponents
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Classes/GameFramework/Actor.h |
| Include | #include "GameFramework/Actor.h" |
template<class AllocatorType>
void GetComponents
&40;
TArray< UActorComponent &42;, AllocatorType > & OutComponents,
bool bIncludeFromChildActors
&41; const
Remarks
UActorComponent specialization of GetComponents() to avoid unnecessary casts. It's recommended to use TArrays with a TInlineAllocator to potentially avoid memory allocation costs. TInlineComponentArray is defined to make this easier, for example: { TInlineComponentArray
Parameters
| Name | Description |
|---|---|
| bIncludeFromChildActors | If true then recurse in to ChildActor components and find components of the appropriate type in those Actors as well |