Exemplo n.º 1
0
        public static void CreateEditor()
        {
            _editor                    = GetWindow <NodeEditorWindow> ();
            _editor.minSize            = new Vector2(800, 600);
            NodeEditor.ClientRepaints += _editor.Repaint;
            NodeEditor.initiated       = NodeEditor.InitiationError = false;

            iconTexture          = ResourceManager.LoadTexture(EditorGUIUtility.isProSkin? "Textures/Icon_Dark.png" : "Textures/Icon_Light.png");
            _editor.titleContent = new GUIContent("Node Editor", iconTexture);
        }
Exemplo n.º 2
0
 public static bool AutoOpenCanvas(int instanceID, int line)
 {
     if (Selection.activeObject != null && Selection.activeObject.GetType() == typeof(NodeCanvas))
     {
         string NodeCanvasPath = AssetDatabase.GetAssetPath(instanceID);
         NodeEditorWindow.CreateEditor();
         EditorWindow.GetWindow <NodeEditorWindow> ().LoadNodeCanvas(NodeCanvasPath);
         return(true);
     }
     return(false);
 }