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(".machine")) { MachineCenter.ManuOpen(path); Open(); } return(false); }
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("Machine", icon); minSize = new Vector2(250, 100); MachineCenter.notifier -= ShowNotification; MachineCenter.notifier += ShowNotification; MachineCenter.Start(); PPaintCenter.ClientRepaints -= Repaint; PPaintCenter.ClientRepaints += Repaint; }
internal static void ExportAllData() { StringBuilder sb = new StringBuilder(); ProgressCommand c = new ProgressCommand(); ProgressCommand child = TreeCenter.GetExportAllCommand(); if (child != null) { sb.Append("Tree export \r\n"); c.Add(child); } child = MachineCenter.GetExportCommand(); if (child != null) { sb.Append("Machine export \r\n"); c.Add(child); } c.notify = sb.ToString(); c.refresh = true; c.StartCommand(); }
private void OnDestroy() { PPaintCenter.ClientRepaints -= Repaint; MachineCenter.notifier -= ShowNotification; MachineCenter.Stop(); }
private void OnGUI() { MachineCenter.OnGUI(position, this == focusedWindow); }