ForEachLoop should warn of no connection

The blueprint compiler now warns of nodes pins that don’t return with a blue NOTE indicator. That’s great.

I think a ForEachLoop should also warn via NOTE if there is no array connected.

After refactoring, it’s quite common that the blueprint editor will simply disconnect nodes and not say anything… and something that used to work just doesn’t. And it’s not trivial to work out why. It should be blatently obvious that a foreach has no collection connected to loop through and the blueprint editor should warn the user! To me it’s a UX issue.

You would never want a ForEachLoop with no array connected, it means that everything in the body would never trigger. it looks innocent yet it’s a pretty big problem.

57615-grr1.png

Hi ,

I have not been able to reproduce this on my end. When I create a foreachloop, I receive an error until an array is plugged into the target pin. What steps did you take to reproduce this on your end. Does this occur in a clean, blank project with no additional content or is this limited to one project?

Thanks ,

Try a typed array variable, drag off it, create a foreach from the array dragged out, then later, change the type of the array. Array will be disconnected and compile silently.

Hi ,

I’ve added a feature request, UE-20904, to be taken into consideration by the development staff for a warning on foreachloop and foreachloopwithbreak nodes to let developers know when no array is connected.

thanks