RealDocs

UBlueprintSetLibrary::Set_Remove

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

Description

Removes an item from a set, returning whether an equal item was actually found and removed.

Caveats & Gotchas

  • Returns false rather than erroring if Item isn't present — check the return value if the distinction matters to your logic.
  • In C++, call TSet::Remove() directly instead of this wildcard wrapper.

Signature

static bool Set_Remove(const TSet<int32>& TargetSet, const int32& Item);

Parameters

Name Type Description Default
TargetSet const TSet<int32>& Wildcard placeholder for the set to remove from. Mutated in place.
Item const int32& Wildcard item to remove.

Return Type

bool

Example

Remove an item C++
TSet<FName> UnlockedLevels;
UnlockedLevels.Add(TEXT("Level01"));
bool bRemoved = UnlockedLevels.Remove(TEXT("Level01")) > 0; // native TSet::Remove returns a count, not a bool

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.