Ejemplo n.º 1
0
        public static bool OnOpenAsset(int instanceID, int line)
        {
            MoronGraph graph;
            String     path;

            path = AssetDatabase.GetAssetPath(instanceID);

            graph = AssetDatabase.LoadAssetAtPath <MoronGraph>(path);
            if (graph == null)
            {
                return(false);
            }

            MoronEditorWindow.graph = graph;

            EditorWindow.GetWindow <MoronEditorWindow>().Show();
            return(true);
        }
Ejemplo n.º 2
0
        public void OnSelectionChange()
        {
            MoronThinker thinker;

            if (!Application.isPlaying)
            {
                return;
            }

            if (Selection.activeGameObject == null)
            {
                return;
            }

            thinker = Selection.activeGameObject.GetComponent <MoronThinker>();
            if (thinker == null)
            {
                return;
            }

            graph = thinker.logic;
            buildGuidMap(thinker);
            Repaint();
        }