UBlueprintSetLibrary::Set_Contains
#include "Kismet/BlueprintSetLibrary.h"
Access: public
Specifiers: staticBlueprintPureCustomThunk
Description
Returns true if the set contains an item that compares equal to ItemToFind.
Caveats & Gotchas
- • Backs the "Contains Item" Blueprint node; in C++ call TSet::Contains() directly instead of this wildcard CustomThunk wrapper.
- • Marked BlueprintThreadSafe, so it's safe to call from async/multithreaded Blueprint contexts as long as nothing else is mutating the set concurrently.
Signature
static bool Set_Contains(const TSet<int32>& TargetSet, const int32& ItemToFind); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| TargetSet | const TSet<int32>& | Wildcard placeholder for the set to search. | — |
| ItemToFind | const int32& | Wildcard placeholder for the item to look for. | — |
Return Type
bool Example
Check membership C++
TSet<FName> UnlockedLevels = { TEXT("Level01"), TEXT("Level02") };
if (UnlockedLevels.Contains(TEXT("Level01")))
{
// native TSet::Contains -- the direct equivalent of the Set_Contains node
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?