TArray::FindItemByClass

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

Windows
MacOS
Linux

Syntax

template<typename SearchType>
bool FindItemByClass
(
    SearchType ** Item,
    int32 * ItemIndex,
    int32 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.

References

Module

Core

Header

Runtime/Core/Public/Containers/Array.h

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback