using UnityEngine; using System.Collections; using System.Text; using System.Runtime.InteropServices; using System; using System.IO; public class OpenFileSelf : MonoBehaviour { public static OpenFileSelf instance; void Awake() { if (instance == null) { instance = this; } } public void ButtonClcik() { string path = Application.dataPath + @"/ExtendFolder/" + "TheImage" + "/"; string fileDir = Path.GetDirectoryName(path); if (!Directory.Exists(fileDir)) { Directory.CreateDirectory(fileDir); } string destniPath = Application.dataPath + @"/ExtendFolder/TheImage/"; string str = @destniPath; str = str.Replace(@"/", @"\"); System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo("Explorer.exe"); psi.Arguments = "\\e,\\select," + str; System.Diagnostics.Process.Start(psi); } public void OpenPicPanel() { ShowPicPanelControl.Instance.gameObject.SetActive(true); ShowPicPanelControl.Instance.transform.GetComponent().localPosition = new Vector3(-660,-50,0); // PrePareModeSet.instance.CloseAssitToggle();//关闭打开的菜单栏 // GetComponent().ResetText(); } }