Exemplo n.º 1
0
 private void UpdateCanvasInfo()
 {
     typeData                  = NodeCanvasManager.GetCanvasTypeData(nodeCanvas);
     openedCanvasPath          = nodeCanvas.savePath;
     this.editorState.canvas   = nodeCanvas;
     NodeEditor.curEditorState = this.editorState;
     NodeEditorSaveManager.SetLastCanvasPath(openedCanvasPath);
 }
 public static void PopulateMenu(ref GenericMenu menu, Action <Type> newNodeCanvas)
 {
     _callBack = newNodeCanvas;
     foreach (KeyValuePair <Type, NodeCanvasTypeData> typeOfCanvase in TypeOfCanvases)
     {
         GenericMenu        obj   = menu;
         NodeCanvasTypeData value = typeOfCanvase.Value;
         obj.AddItem(new GUIContent(value.DisplayString), false, CreateNewCanvas, typeOfCanvase.Value);
     }
 }
Exemplo n.º 3
0
        private static void unwrapCanvasTypeCallback(object data)
        {
            NodeCanvasTypeData typeData = (NodeCanvasTypeData)data;

            _menuCallback(typeData.CanvasType);
        }
        private static void CreateNewCanvas(object userdata)
        {
            NodeCanvasTypeData nodeCanvasTypeData = (NodeCanvasTypeData)userdata;

            _callBack(nodeCanvasTypeData.CanvasType);
        }
Exemplo n.º 5
0
 private void UpdateCanvasInfo()
 {
     typeData = NodeCanvasManager.getCanvasTypeData(nodeCanvas);
 }
        private static void unwrapTypeCallback(object userdata)
        {
            NodeCanvasTypeData data = (NodeCanvasTypeData)userdata;

            _callBack(data.CanvasType);
        }