TSet "for each" loop in blueprint without copying to array

Are there any plans to add a “for each” loop node for blueprint TSets? Copying the entire set to an array with the ToArray node seems like it would have an impact on performance (which kind of defeats the purpose of using sets). It’s also a bit of a hassle to use the ToArray node every time I want to access any element of the TSet.

2 Likes

For those seeking a solution to the issue mentioned above:

Encountering the same problem, I’ve crafted a ForEachLoop and included it in a PR. Even if it doesn’t get merged into UE, you can still employ the TSet-native ForEachLoop by crafting a CustomLibrary with the code from that commit and utilizing it.