Switch

The Switch node is used for identifying which connection to run based on the value.

The default connection will be executed if no condition is passed.

Examples

Flow Graph:

Generated Script:

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

public class test : MonoBehaviour {
  public int variable0 = 1;

  public void Start() {
    switch(variable0) {
      case 1: {
        Debug.Log("1");
      }
      break;
      case 2: {
        Debug.Log("2");
      }
      break;
    }
  }
}

 

Was this helpful to you?

Leave a Reply

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