UBlueprintSetLibrary::Set_Intersection
#include "Kismet/BlueprintSetLibrary.h"
Access: public
Specifiers: staticBlueprintCallableCustomThunk
Description
Assigns Result to the intersection of Set A and Set B — every element present in both sets.
Caveats & Gotchas
- • To intersect with the empty set, just call Set_Clear on Result instead of wiring in an empty set literal.
- • Result is written in place — use a separate set variable for it rather than reusing A or B, or you'll be mutating an input mid-operation.
Signature
static void Set_Intersection(const TSet<int32>& A, const TSet<int32>& B, TSet<int32>& Result); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | const TSet<int32>& | Wildcard placeholder for one set to intersect. | — |
| B | const TSet<int32>& | Wildcard placeholder for the other set to intersect. | — |
| Result | TSet<int32>& | Wildcard output set that receives the elements common to both A and B. | — |
Return Type
void Example
Intersect two sets C++
TSet<int32> A = {1, 2, 3};
TSet<int32> B = {2, 3, 4};
TSet<int32> Result = A.Intersect(B); // {2, 3} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?