LubanTools支持

This commit is contained in:
Alex-Rachel
2025-03-12 11:40:05 +08:00
parent 106d90da4d
commit 77d07e175a
5 changed files with 46 additions and 4 deletions

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: caeffc4d6ca44936a5c2e191a6ef906e
timeCreated: 1741750069

View File

@@ -0,0 +1,20 @@
using UnityEditor;
using UnityEngine;
namespace TEngine.Editor
{
public static class LubanTools
{
[MenuItem("TEngine/Luban/转表 &X", priority = -100)]
private static void ZhuanXiaoYi()
{
#if UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX
string path = Application.dataPath + "/../../Configs/GameConfig/gen_code_bin_to_project_lazyload.sh";
#elif UNITY_EDITOR_WIN
string path = Application.dataPath + "/../../Configs/GameConfig/gen_code_bin_to_project_lazyload.bat";
#endif
Debug.Log($"执行转表:{path}");
ShellHelper.RunByPath(path);
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 16ad4ede8ed745f3b6f90b58b7427f5e
timeCreated: 1741750081

View File

@@ -102,5 +102,13 @@ namespace TEngine.Editor
process.Close();
}
}
public static void RunByPath(string path)
{
if (!string.IsNullOrEmpty(path))
{
Process.Start(path);
}
}
}
}