blueprint
Optimized For Each with Break
- Exposure: public
- UE Version: 5.6
Optimizes For Each Standard Macro to simplify the loop, and support break with no performance loss if you don't use it.
Avoids Pure Function performance gotcha by copying the array to local variable. This solves an issue where performance is drastically impacted by feeding a pure function into the For Loop requiring manual cache.
Item is cached to not invoke further copies on array get
While it's ugly here on blueprintUE, it actually looks clean in editor.