Esempio n. 1
0
 public static bool OnGraphAssetOpen(int instanceID, int line)
 {
     if (typeof(NodeGraph).IsAssignableFrom(EditorUtility.InstanceIDToObject(instanceID).GetType()))
     {
         LogicalTheoryWindow window = OpenWindow();
         window.OpenGraph(AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(instanceID)));
         return(true);
     }
     return(false);
 }
Esempio n. 2
0
        public override VisualElement CreateInspectorGUI()
        {
            VisualElement container  = new VisualElement();
            Button        openButton = new Button();

            openButton.text     = "Open Graph";
            openButton.clicked += () =>
            {
                LogicalTheoryWindow window = OpenWindow();
                window.OpenGraph(AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath((target as NodeGraph).GetInstanceID())));
            };
            container.Add(openButton);
            return(container);
        }