ForEachObjectOfClasses

Performs an operation on all objects of the provided classes

Choose your operating system:

Windows

macOS

Linux

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/UObject/UObjectHash.h

Include

#include "UObject/UObjectHash.h"

Source

/Engine/Source/Runtime/CoreUObject/Private/UObject/UObjectHash.cpp

Syntax

void ForEachObjectOfClasses
(
    TArrayView< const UClass * > ClassesToLookFor,
    TFunctionRef< void *)> Operation,
    EObjectFlags ExcludeFlags,
    EInternalObjectFlags ExclusionInternalFlags
)

Remarks

Performs an operation on all objects of the provided classes

that the operation must not modify UObject hash maps so it can not create, rename or destroy UObjects.

Parameters

Parameter

Description

Classes

UObject Classes to loop over instances of

Operation

Function to be called for each object

bIncludeDerivedClasses

If true, the results will include objects of child classes as well.

AdditionalExcludeFlags

Objects with any of these flags will be excluded from the results.