Developer Notes

This scenario will now only occur if the collapsed nodes aren't currently linked to any other nodes outside of the ones being collapsed.
Unfortunately this issue isn't entirely solvable due to the ambiguous nature of traversing execution path coupled with macros; however there should be significantly less occurrences.

Description

When you create a blueprint setup with a For Each loop and attempt to use Collapse to Function, the return node is connected to the loop body as well as the completed pin. This causes an issue because the execution of the loop ends after the first loop.

Found in 4.9.2, reproduced in 4.10 binary and Main CL 2765475.

Steps to Reproduce

1. Open the editor
2. Create a new blueprint
3. Add a ForEach loop
4. Right click on the ForEach node and select Collapse to Function

Result: In the function, the ForEach node is hooked up to the return node from both the Completed pin and the Loop Body pin, which causes it to end after the first execution.

Expected: Only the completed pin would connect to the return node.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Won't Fix
ComponentUE - Gameplay - Blueprint
Affects Versions4.9.24.104.11
CreatedNov 16, 2015
ResolvedNov 2, 2016
UpdatedApr 27, 2018