/// <summary>
        /// A callback method to call the elements inside context menu
        /// </summary>
        /// <param name="obj"></param>
        void ContextCallback(object obj)
        {
            switch (obj.ToString())
            {
            case "0":
                //Debug.Log("Created a new graph");
                //ChainEditorUtilities.CreateNewGraph();
                GraphCreationPopUp.Open();
                break;

            case "1":
                //Debug.Log("Loaded a graph");
                ChainEditorUtilities.LoadGraph();
                break;

            case "2":
                //Debug.Log("Unloaded a graph");
                ChainEditorUtilities.UnloadGraph();
                break;

            case "3":
                ChainEditorUtilities.CreateNode(graph, NodeType.ChainBehaviorNode, _mousePos);
                break;

            case "4":
                ChainEditorUtilities.CreateNode(graph, NodeType.RootBehaviorNode, _mousePos);
                break;

            case "5":
                ChainEditorUtilities.DeleteNode(_deleteNodeIndex, graph);
                break;

            case "6":
                ChainEditorUtilities.UpdateGraphToModel(graph);
                break;
            }
        }
Exemple #2
0
 private void OnFile_LoadGraph()
 {
     ChainEditorUtilities.LoadGraph();
 }