Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/AActor
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const TSet< UActorComponent * > & GetComponents () |
Get a direct reference to the Components set rather than a copy with the null pointers removed. | GameFramework/Actor.h | |
void GetComponents
(
TArray< ComponentType, AllocatorType >& OutComponents, |
Get all components derived from class 'ComponentType' and fill in the OutComponents array with the result. | GameFramework/Actor.h | |
void GetComponents
(
TArray< T*, AllocatorType >& OutComponents, |
Get all components derived from class 'ComponentType' and fill in the OutComponents array with the result. | GameFramework/Actor.h | |
void GetComponents
(
TArray< TObjectPtr< T >, AllocatorType >& OutComponents, |
Get all components derived from class 'T' and fill in the OutComponents array with the result. | GameFramework/Actor.h | |
void GetComponents
(
TArray< UActorComponent*, AllocatorType >& OutComponents, |
UActorComponent specialization of GetComponents() to avoid unnecessary casts. | GameFramework/Actor.h | |
void GetComponents
(
TSubclassOf< UActorComponent > ComponentClass, |
Get all components derived from specified ComponentClass and fill in the OutComponents array with the result. | GameFramework/Actor.h |
GetComponents()
Description
Get a direct reference to the Components set rather than a copy with the null pointers removed. WARNING: anything that could cause the component to change ownership or be destroyed will invalidate this array, so use caution when iterating this set!
| Name | GetComponents |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/Actor.h |
| Include Path | #include "GameFramework/Actor.h" |
const TSet < UActorComponent * > & GetComponents() const
GetComponents(TArray< ComponentType, AllocatorType > &, bool)
Description
Get all components derived from class 'ComponentType' and fill in the OutComponents array with the result. 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
| Name | GetComponents |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/Actor.h |
| Include Path | #include "GameFramework/Actor.h" |
template<class ComponentType, class AllocatorType>
void GetComponents
(
TArray < ComponentType, AllocatorType > & OutComponents,
bool bIncludeFromChildActors
) const
Parameters
| Name | Remarks |
|---|---|
| bIncludeFromChildActors | If true then recurse in to ChildActor components and find components of the appropriate type in those Actors as well |
GetComponents(TArray< T *, AllocatorType > &, bool)
Description
Get all components derived from class 'ComponentType' and fill in the OutComponents array with the result. 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
| Name | GetComponents |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/Actor.h |
| Include Path | #include "GameFramework/Actor.h" |
template<class T, class AllocatorType>
void GetComponents
(
TArray < T *, AllocatorType > & OutComponents,
bool bIncludeFromChildActors
) const
Parameters
| Name | Remarks |
|---|---|
| bIncludeFromChildActors | If true then recurse in to ChildActor components and find components of the appropriate type in those Actors as well |
GetComponents(TArray< TObjectPtr< T >, AllocatorType > &, bool)
Description
Get all components derived from class 'T' and fill in the OutComponents array with the result. 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
| Name | GetComponents |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/Actor.h |
| Include Path | #include "GameFramework/Actor.h" |
template<class T, class AllocatorType>
void GetComponents
(
TArray < TObjectPtr < T >, AllocatorType > & OutComponents,
bool bIncludeFromChildActors
) const
Parameters
| Name | Remarks |
|---|---|
| bIncludeFromChildActors | If true then recurse in to ChildActor components and find components of the appropriate type in those Actors as well |
GetComponents(TArray< UActorComponent *, AllocatorType > &, bool)
Description
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
| Name | GetComponents |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/Actor.h |
| Include Path | #include "GameFramework/Actor.h" |
template<class AllocatorType>
void GetComponents
(
TArray < UActorComponent *, AllocatorType > & OutComponents,
bool bIncludeFromChildActors
) const
Parameters
| Name | Remarks |
|---|---|
| bIncludeFromChildActors | If true then recurse in to ChildActor components and find components of the appropriate type in those Actors as well |
GetComponents(TSubclassOf< UActorComponent >, TArray< ComponentType *, AllocatorType > &, bool)
Description
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. TInlineComponentArray is defined to make this easier, for example: { TInlineComponentArray
| Name | GetComponents |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/Actor.h |
| Include Path | #include "GameFramework/Actor.h" |
template<class AllocatorType, class ComponentType>
void GetComponents
(
TSubclassOf < UActorComponent > ComponentClass,
TArray < ComponentType *, AllocatorType > & OutComponents,
bool bIncludeFromChildActors
) const
Parameters
| Name | Remarks |
|---|---|
| ComponentClass | The component class to find all components of a class derived from |
| bIncludeFromChildActors | If true then recurse in to ChildActor components and find components of the appropriate type in those Actors as well |