Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/AActor
Description
Gets all the components that inherit from the given class. Currently returns an array of UActorComponent which must be cast to the correct type. This intended to only be used by blueprints. Use GetComponents() in C++.
| Name | K2_GetComponentsByClass |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/Actor.h |
| Include Path | #include "GameFramework/Actor.h" |
| Source | /Engine/Source/Runtime/Engine/Private/Actor.cpp |
UFUNCTION (BlueprintCallable, Category="Actor",
Meta=(ComponentClass="/Script/Engine.ActorComponent", DisplayName="Get Components By Class", ScriptName="GetComponentsByClass", DeterminesOutputType="ComponentClass"))
TArray < UActorComponent * > K2_GetComponentsByClass
(
TSubclassOf < UActorComponent > ComponentClass
) const