#if (UNITY_EDITOR) using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; using System.Diagnostics; using System; public class XMLEditor : EditorWindow { public static String processPath; public String path; [MenuItem("Zero Knowledge Tools / XML Editor")] private static void NewMenuOption() { XMLEditor window = (XMLEditor)GetWindow(typeof(XMLEditor)); window.Show(); } void OnGUI() { if (GUILayout.Button("Executable file")) { path = EditorUtility.OpenFilePanel("Open XML editor", "", "exe"); } GUILayout.Label("Xml editor path", EditorStyles.boldLabel); processPath = EditorGUILayout.TextField("Executable path", path); if (GUILayout.Button("Open")) { OpenXML(); } } private void OpenXML() { try { Process myProcess = new Process(); myProcess.StartInfo.FileName = processPath; myProcess.Start(); //myProcess.WaitForExit(); } catch (Exception e) { Console.WriteLine(e); } } } #endif