private static void OpenWindow()
        {
            StateMachineWindow window = GetWindow <StateMachineWindow>();

            window.titleContent = new GUIContent("State Machine");
            window.minSize      = new Vector2(800, 600);
        }
        public static void OpenWindow(StateMachineController stateMachine)
        {
            StateMachineWindow window = GetWindow <StateMachineWindow>();

            window.titleContent = new GUIContent("State Machine");
            window.minSize      = new Vector2(800, 600);
            window.stateMachine = stateMachine;

            window.serializedObject = new SerializedObject(stateMachine);

            window.nodesInfo       = (NodesInfo)AssetDatabase.LoadAssetAtPath(AssetDatabase.GetAssetPath(stateMachine), typeof(NodesInfo));
            window.transitions     = new List <List <int> >(StateMachineReflections.GetTransitions(stateMachine).Select(i => i.ToList()));
            window.startStateIndex = StateMachineReflections.GetStartStateIndex(stateMachine);
        }