AActor::K2_GetComponentsByClass

Gets all the components that inherit from the given class.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/GameFramework/Actor.h

Include

#include "GameFramework/Actor.h"

Source

/Engine/Source/Runtime/Engine/Private/Actor.cpp

Syntax

TArray< UActorComponent * > K2_GetComponentsByClass
(
    TSubclassOf< UActorComponent > ComponentClass
) const

Remarks

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++.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss