RealDocs

UKismetArrayLibrary::SortInt64Array

function Engine Blueprint Since unknown
#include "Kismet/KismetArrayLibrary.h"
Access: public Specifiers: staticBlueprintCallable

Description

Sorts an array of 64-bit integers in place by numeric value. Shows in the Blueprint palette as "Sort Integer64 Array".

Caveats & Gotchas

  • Sorts in place and mutates TargetArray directly; there is no non-mutating overload.
  • Needed specifically for int64 arrays (e.g. large IDs, timestamps) — passing a TArray<int32> requires SortIntArray instead since Blueprint array nodes are type-specific.

Signature

static void SortInt64Array(UPARAM(Ref) TArray<int64>& TargetArray, bool bStableSort = false, EArraySortOrder SortOrder = EArraySortOrder::Ascending);

Parameters

Name Type Description Default
TargetArray TArray<int64>& The array of 64-bit integers to sort in place.
bStableSort bool If true, uses a stable sort that preserves the relative order of equal elements, at a performance cost. false
SortOrder EArraySortOrder Whether to sort ascending or descending. EArraySortOrder::Ascending

Return Type

void

Example

Sort large IDs ascending C++
TArray<int64> PlayerIds = { 9000000001LL, 100LL, 4500000000LL };
UKismetArrayLibrary::SortInt64Array(PlayerIds, false, EArraySortOrder::Ascending);
// PlayerIds is now [100, 4500000000, 9000000001]

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.