But it looks like
ExpandEnumAsExecs
only affects execution after the function has finished, so the loop never happens.
ExpandEnumAsExecs
is basically a Switch
statement on the resulting enum. You can’t use it like you did.
If, instead of Keys/Find you first query both Keys and Values as arrays, and Get
latter by the index in the loop, that should be probably more efficient than your BP example.
If you would like to do it properly, you’ll probably have to set up your own custom Blueprint node; for this, you can look into UK2Node
(you’ll find quite some examples for it in the engine source code), but it’s a more involved undertaking.