ContainsObjectOfClass

Determines whether the specified array contains objects of the specified class.

Windows
MacOS
Linux

References

Module

CoreUObject

Header

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

Include

#include "UObject/UObjectGlobals.h"

Syntax

template<class T>
bool ContainsObjectOfClass
(
    const TArray< T * > & ObjectArray,
    UClass * ClassToCheck,
    bool bExactClass,
    TArray< T * > * out_Objects
)

Remarks

Determines whether the specified array contains objects of the specified class.

Parameters

Parameter

Description

ObjectArray

the array to search - must be an array of pointers to instances of a UObject-derived class

ClassToCheck

the object class to search for

bExactClass

true to consider only those objects that have the class specified, or false to consider objects of classes derived from the specified SearhClass as well

out_Objects

if specified, any objects that match the SearchClass will be added to this array

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