UBlueprintSetLibrary::Set_Add
#include "Kismet/BlueprintSetLibrary.h"
Access: public
Specifiers: staticBlueprintCallableCustomThunk
Description
Adds an item to a set. If an equal item is already present the set is left unchanged, since sets only ever store one copy of each unique value.
Caveats & Gotchas
- • Silently does nothing if NewItem already compares equal to an existing element — there's no output pin telling you whether an insertion actually happened.
- • In C++, call TSet::Add() directly instead of routing through this wildcard CustomThunk wrapper.
Signature
static void Set_Add(const TSet<int32>& TargetSet, const int32& NewItem); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| TargetSet | const TSet<int32>& | Wildcard placeholder for the set to add to. Mutated in place. | — |
| NewItem | const int32& | Wildcard item to insert. | — |
Return Type
void Example
Add a unique item C++
TSet<FName> UnlockedLevels;
UnlockedLevels.Add(TEXT("Level01")); // native TSet::Add — the direct equivalent of the Set_Add node Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?