Download

Set TSet node works like Add node under for loop in BP. But TArray is not

With below,

void ARep02GameModeBase::TArrayTest(int32 InNumber, TArray<int32>& OutArray)
{
	OutArray.Add(InNumber);
}

void ARep02GameModeBase::TSetTest(int32 InNumber, TSet<int32>& OutSet)
{
	OutSet.Add(InNumber);
}

I made this Blueprint function,

And when I run this, I got:
n2

I can guess why this happen. But - Should I look this is intended?

You can see full code in here : GitHub - cutycutyhyaline/UE4TMapAndTSetWithForLoop

And here are additional tests : In Blueprint For loop, set nodes for TMap or TSet work like Add node. – Hyaline