RealDocs

UBlueprintSetLibrary::Set_AddItems

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

Description

Adds every element of an array to a set in one call, skipping any that are already present.

Caveats & Gotchas

  • Equivalent to calling Set_Add in a loop over NewItems, but avoids per-iteration Blueprint node overhead.
  • Duplicate items within NewItems itself collapse to a single set entry, same as any other set insertion.

Signature

static void Set_AddItems(const TSet<int32>& TargetSet, const TArray<int32>& NewItems);

Parameters

Name Type Description Default
TargetSet const TSet<int32>& Wildcard placeholder for the set to add to. Mutated in place.
NewItems const TArray<int32>& Wildcard array whose elements are added to the set.

Return Type

void

Example

Bulk-add items C++
TSet<FName> UnlockedLevels;
TArray<FName> NewUnlocks = { TEXT("Level01"), TEXT("Level02") };
UnlockedLevels.Append(NewUnlocks); // native TSet::Append — the direct equivalent of the Set_AddItems node

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.