TArray::FindItemByClass

Searches for the first entry of the specified type, will only work with [TArray](API\Runtime\Core\Containers\TArray).

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Containers/Array.h

Include

#include "Containers/Array.h"

Syntax

template<typename SearchType>
bool FindItemByClass
(
    SearchType ** Item,
    SizeType * ItemIndex,
    SizeType StartIndex
) const

Remarks

Searches for the first entry of the specified type, will only work with TArray. Optionally return the item's index, and can specify the start index.

Returns

True if element was found. False otherwise.

Parameters

Parameter

Description

Item

(Optional output) If it's not null, then it will point to the found element. Untouched if element hasn't been found.

ItemIndex

(Optional output) If it's not null, then it will be set to the position of found element in the array. Untouched if element hasn't been found.

StartIndex

(Optional) Index in array at which the function should start to look for element.

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