UKismetArrayLibrary::Array_Remove
#include "Kismet/KismetArrayLibrary.h"
Access: public
Specifiers: staticBlueprintCallableCustomThunk
Description
Removes the element at the given index from an array, shifting later elements down by one.
Caveats & Gotchas
- • Displayed in Blueprint as 'Remove Index' with CompactNodeTitle 'REMOVE INDEX' — the plain name 'Remove' is used by Array_RemoveItem instead, which removes by value rather than index.
- • Passing an out-of-range IndexToRemove logs a warning at runtime and leaves the array unchanged rather than crashing.
- • This is a shifting removal (like TArray::RemoveAt), not a swap-and-pop — it preserves order but is O(n) for large arrays.
Signature
static void Array_Remove(UPARAM(ref) TArray<int32>& TargetArray, int32 IndexToRemove); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| TargetArray | UPARAM(ref) TArray<int32>& | The array to remove from. Passed by reference and mutated in place. | — |
| IndexToRemove | int32 | The index of the element to remove. | — |
Return Type
void Example
Remove element by index C++
TArray<int32> Values = { 10, 20, 30 };
UKismetArrayLibrary::Array_Remove(Values, 1);
// Values is now { 10, 30 } See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?