RealDocs

50 results for "array"

class
TArray Core

The primary dynamic array container in Unreal Engine, equivalent to `std::vector`.

class
UKismetArrayLibrary Engine

Blueprint function library exposing generic array operations (add, remove, shuffle, sort, search, and more) that work against any wildcard array type.

property
TArray::ArrayMax Core

Stores the number of elements the array can hold before a reallocation is needed.

property
TArray::ArrayNum Core

Stores the number of elements currently held in the array.

function
UKismetArrayLibrary::Array_Add Engine

Appends an item to the end of an array and returns the index of the newly added element.

function
UKismetArrayLibrary::Array_AddUnique Engine

Adds an item to the array only if an equal item isn't already present, returning the index of the item.

function
UKismetArrayLibrary::Array_Append Engine

Appends all elements of one array onto the end of another array in place.

function
UKismetArrayLibrary::Array_Clear Engine

Removes all elements from an array, leaving it empty.

function
UKismetArrayLibrary::Array_Contains Engine

Returns true if the array contains at least one instance of a value.

function
UKismetArrayLibrary::Array_Find Engine

Returns the index of the first instance of a value in an array, or -1 if it isn't found.

function
UKismetArrayLibrary::Array_Get Engine

Returns a copy of the array element at the given index via an output parameter.

function
UKismetArrayLibrary::Array_Identical Engine

Checks whether two arrays are memberwise identical — same length and equal elements at every index, in order.

function
UKismetArrayLibrary::Array_Insert Engine

Inserts an item into an array at the given index, shifting later elements up by one.

function
UKismetArrayLibrary::Array_IsEmpty Engine

Returns true if the array has no elements.

function
UKismetArrayLibrary::Array_IsNotEmpty Engine

Returns true if the array has at least one element.

function
UKismetArrayLibrary::Array_IsValidIndex Engine

Returns true if the given index is within bounds for the array — greater than or equal to zero and less than its length.

function
UKismetArrayLibrary::Array_LastIndex Engine

Returns the index of the last element in an array.

function
UKismetArrayLibrary::Array_Length Engine

Returns the number of elements in an array.

function
UKismetArrayLibrary::Array_Random Engine

Picks a random element from an array using the global random stream and returns both the value and its index.

function
UKismetArrayLibrary::Array_RandomFromStream Engine

Picks a random element from an array using a caller-supplied FRandomStream, producing reproducible results for a given seed.

function
UKismetArrayLibrary::Array_Remove Engine

Removes the element at the given index from an array, shifting later elements down by one.

function
UKismetArrayLibrary::Array_RemoveItem Engine

Removes all instances of a value from an array and reports whether anything was removed.

function
UKismetArrayLibrary::Array_Resize Engine

Resizes an array to the given size, truncating extra elements or appending default-constructed ones as needed.

function
UKismetArrayLibrary::Array_Reverse Engine

Reverses the order of the elements in an array, in place.

function
UKismetArrayLibrary::Array_Set Engine

Assigns a value to the array element at the given index, optionally growing the array to fit.

function
UKismetArrayLibrary::Array_Shuffle Engine

Randomizes the order of the elements in an array in place using the engine's global random stream.

function
UKismetArrayLibrary::Array_ShuffleFromStream Engine

Randomizes the order of the elements in an array in place, drawing randomness from the given FRandomStream for deterministic results.

function
UKismetArrayLibrary::Array_Swap Engine

Swaps the elements at two indices in an array.

function
TArray::Add Core

Appends an element to the end of the array and returns its index.

function
TArray::AddDefaulted Core

Appends Count new elements at the end of the array, each default-constructed via DefaultConstructItems.

function
TArray::AddUninitialized Core

Grows the array by Count elements without constructing them, returning the index of the first new slot.

function
TArray::AddUnique Core

Adds an element only if it is not already present in the array.

function
TArray::AddZeroed Core

Appends Count new elements at the end of the array, zero-initialising their memory via FMemory::Memzero.

property
TArray::AllocatorInstance Core

The allocator object responsible for managing the raw memory backing the array.

function
TArray::Append Core

Appends all elements from Source to the end of this array in a single allocation.

function
TArray::AppendHash Core

A static method that feeds the element type's layout descriptor into a SHA1 hash.

function
TArray::BulkSerialize Core

Serializes the entire array as a raw memory blob during loading, bypassing per-element serialization for significant performance gains.

function
TArray::CheckAddress Core

Asserts that the given address does not point into the array's current backing buffer.

function
TArray::CheckInvariants Core

Asserts (in Debug/Development builds only) that ArrayNum >= 0 and ArrayMax >= ArrayNum.

function
TArray::Contains Core

Returns true if the array contains at least one element equal to Item.

function
TArray::ContainsByPredicate Core

Returns true if any element satisfies the predicate.

function
TArray::CopyUnfrozen Core

Reconstructs a live TArray from a frozen (WriteMemoryImage) binary representation by placement-constructing a new TArray at Dst and copying element data through the allocator's CopyUnfrozen path.

function
TArray::CountBytes Core

Reports the array's current and peak memory usage to an accounting archive by calling Ar.

function
TArray::Emplace Core

Constructs a new element in-place at the end of the array using the provided constructor arguments.

function
TArray::EmplaceAt Core

Constructs a new element in-place at the given index, shifting all subsequent elements right by one.

function
TArray::Empty Core

Destructs all elements and sets Num to 0.

function
UKismetArrayLibrary::FilterArray Engine

Returns a new array containing only the actors from TargetArray that are instances of FilterClass.

function
TArray::Find Core

Searches for Item using operator== and returns true if found, setting Index to its position.

function
TArray::FindByPredicate Core

Returns a pointer to the first element for which Pred returns true, or nullptr if none match.

function
TArray::FindItemByClass Core

Searches a TArray of UObject pointers for the first element whose runtime class matches (via IsA) the template parameter SearchType.