The Continue node passes control to the next iteration of the enclosing while, do, for, or foreach statement in which it appears.
Examples
In this example, the For Number Loop node is called at start. It then loop 5x each loop it call “if node” if the index is equal to 3 then it will skip the current loop. The “Debug Log” node will called after “If node” finished whatever the condition is true or false, but when the index is 3 the node will not be called because skipped by “Continue” node.
Flow Graph:
Generated Script:
using UnityEngine; using System.Collections.Generic; public class Program : MonoBehaviour { private int index; public void Start() { for(index = 0; index < 5; index += 1) { if((index == 3)) { continue; } Debug.Log(index); } } }
Output:
0 1 2 4