UKismetArrayLibrary::Array_Random

Gets a random item from specified array

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Kismet/KismetArrayLibrary.h

Include

#include "Kismet/KismetArrayLibrary.h"

Source

/Engine/Source/Runtime/Engine/Private/KismetArrayLibrary.cpp

Syntax

static void Array_Random
(
    const TArray< int32 > & TargetArray,
    int32 & OutItem,
    int32 & OutIndex
)

Remarks

Gets a random item from specified array

Parameters

Parameter

Description

TargetArray

The array

OutItem

The random item from this array

OutIndex

The index of random item (will be -1 if array is empty)

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