From 54fad068f41ba7b0d2f16699a3f774be2a0d84e9 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期四, 14 二月 2019 12:02:50 +0800
Subject: [PATCH] 3335 配置表读取重构。
---
Assets/Editor/Tool/FileOpenEx.cs | 51 ++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 40 insertions(+), 11 deletions(-)
diff --git a/Assets/Editor/Tool/FileOpenEx.cs b/Assets/Editor/Tool/FileOpenEx.cs
index f9bb041..66ab236 100644
--- a/Assets/Editor/Tool/FileOpenEx.cs
+++ b/Assets/Editor/Tool/FileOpenEx.cs
@@ -1,7 +1,7 @@
-锘�
-using UnityEngine;
+锘縰sing UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
+using System.IO;
public class FileOpenEx
{
@@ -21,16 +21,45 @@
if (name.EndsWith(".Shader") || name.EndsWith(".cginc") || name.EndsWith(".shader") || name.EndsWith(".lua.txt") || name.EndsWith(".lua"))
{
- System.Diagnostics.Process process = new System.Diagnostics.Process();
- System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
- startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
- startInfo.FileName = "C:/Program Files/Microsoft VS Code/Code.exe";
- startInfo.Arguments = name;
- process.StartInfo = startInfo;
- process.Start();
- return true;
+ if (string.IsNullOrEmpty(ExtensionalTools.shaderEditorPath))
+ {
+ return false;
+ }
+ else
+ {
+ System.Diagnostics.Process process = new System.Diagnostics.Process();
+ System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
+ startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
+ startInfo.FileName = ExtensionalTools.shaderEditorPath;
+ startInfo.Arguments = name;
+ process.StartInfo = startInfo;
+ process.Start();
+ return true;
+ }
+ }
+
+ if (name.EndsWith(".txt") && name.Contains("ResourcesOut") && name.Contains("Refdata"))
+ {
+ if (string.IsNullOrEmpty(ExtensionalTools.txtEditorPath))
+ {
+ return false;
+ }
+ else
+ {
+ System.Diagnostics.Process process = new System.Diagnostics.Process();
+ System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
+
+ startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
+ startInfo.FileName = ExtensionalTools.txtEditorPath;
+
+ name = ExcelReader.GetExcelPath(Path.GetFileNameWithoutExtension(path));
+ startInfo.Arguments = name;
+ process.StartInfo = startInfo;
+ process.Start();
+ return true;
+ }
}
return false;
}
-}
\ No newline at end of file
+}
--
Gitblit v1.8.0