Ejemplo n.º 1
0
        private static bool AutotOpenCanvas(int instanceId, int line)
        {
            string path = AssetDatabase.GetAssetPath(EditorUtility.InstanceIDToObject(instanceId));
            string name = Application.dataPath + "/" + path.Replace("Assets/", "");

            if (name.EndsWith(".diagram"))
            {
                DiagramCenter.ManuOpen(path);
                Open();
            }
            return(false);
        }
Ejemplo n.º 2
0
        internal void OnEnable()
        {
            PResourceManager.SetDefaultResourcePath("Assets/Res/Scripts/Editor/res/");
            Texture icon = PResourceManager.LoadTexture(EditorGUIUtility.isProSkin
                ? "Textures/Icon_Dark.png"
                : "Textures/Icon_Light.png");

            titleContent = new GUIContent("Diagram", icon);
            minSize      = new Vector2(250, 100);
            //   wantsMouseMove = true;
            DiagramCenter.notifier -= ShowNotification;
            DiagramCenter.notifier += ShowNotification;
            DiagramCenter.Start();
            PPaintCenter.ClientRepaints -= Repaint;
            PPaintCenter.ClientRepaints += Repaint;
        }
Ejemplo n.º 3
0
 private void OnDestroy()
 {
     PPaintCenter.ClientRepaints -= Repaint;
     DiagramCenter.notifier      -= ShowNotification;
     DiagramCenter.Stop();
 }
Ejemplo n.º 4
0
 private void OnGUI()
 {
     DiagramCenter.OnGUI(position, this == focusedWindow);
 }