删除所有工具脚本中的测试菜单代码(Tools菜单下的测试项)

This commit is contained in:
Shiliang
2026-05-27 16:51:51 +08:00
parent 3404f89f93
commit bc87ac4d9c
3 changed files with 0 additions and 71 deletions

View File

@@ -9,19 +9,6 @@ using TMPro;
public static class UIPrefabToJson
{
[MenuItem("Tools/UI/Export Prefab to JSON")]
public static void ExportPrefabToJsonMenu()
{
string prefabPath = EditorUtility.OpenFilePanel("选择预制体", "Assets", "prefab");
if (!string.IsNullOrEmpty(prefabPath))
{
string projectPath = Application.dataPath.Replace("/Assets", "");
string relativePath = prefabPath.Replace(projectPath + "/", "");
string jsonPath = relativePath.Replace(".prefab", ".json");
ExportPrefabToJson(relativePath, jsonPath);
}
}
public static void ExportPrefabToJson(string prefabPath, string jsonPath = null)
{
if (!AssetDatabase.LoadAssetAtPath<GameObject>(prefabPath))