RealDocs

UBlueprintSetLibrary::Set_RemoveItems

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

Description

Removes every element of an array from a set in one call. Items not present in the set are silently skipped.

Caveats & Gotchas

  • No return value indicating how many (if any) items were actually removed — use Set_Remove in a loop if you need per-item removal results.
  • Equivalent to calling Set_Remove for each element of Items, but avoids per-iteration Blueprint node overhead.

Signature

static void Set_RemoveItems(const TSet<int32>& TargetSet, const TArray<int32>& Items);

Parameters

Name Type Description Default
TargetSet const TSet<int32>& Wildcard placeholder for the set to remove from. Mutated in place.
Items const TArray<int32>& Wildcard array of elements to remove from the set.

Return Type

void

Example

Bulk-remove items C++
TSet<FName> UnlockedLevels = { TEXT("Level01"), TEXT("Level02") };
TArray<FName> ToRemove = { TEXT("Level01") };
for (const FName& Level : ToRemove) // native equivalent of the Set_RemoveItems node
{
    UnlockedLevels.Remove(Level);
}

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.