WhileLoop

The WhileLoop node executes a body until a Condition evaluates to false.

 

Examples

Flow Graph:

Generated Script:

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class test : MonoBehaviour {

  public void Start() {
    int i = 0;
    while((i < 9)) {
      Debug.Log(i);
      i += 1;
    }
  }
}

Output:

0
1
2
3
4
5
6
7
8

 

Was this helpful to you?

Leave a Reply

Your email address will not be published. Required fields are marked *