AActor::ForEachComponent

Calls the compile-time lambda on each component of the specified type

Windows
MacOS
Linux

References

Module

Engine

Header

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

Include

#include "GameFramework/Actor.h"

Syntax

template<class ComponentType, typename Func>
void ForEachComponent
(
    bool bIncludeFromChildActors,
    Func InFunc
) const

Remarks

Calls the compile-time lambda on each component of the specified type

Parameters

Parameter

Description

ComponentType

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

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