Search Unity

how to trigger bolt stuff from inspector ?

Discussion in 'Visual Scripting' started by acropole, Mar 24, 2021.

  1. acropole

    acropole

    Joined:
    Aug 13, 2009
    Posts:
    171
    This don't work : https://docs.unity3d.com/2019.3/Documentation/Manual/bolt-events.html

    with my OnInspectorGUI code :

    Code (CSharp):
    1.             if (GUILayout.Button("Make Quad"))
    2.             {
    3.                 FlowMachine flow = procMesh.GetComponent<FlowMachine>();
    4.                 if (flow)
    5.                 {
    6.                     CustomEvent.Trigger(procMesh.gameObject, "MakeQuad");
    7.                 }
    8.                 else
    9.                 {
    10.                     UnityEngine.Debug.LogError("no FlowMachine");
    11.                 }
    12.             }
    13.