删除所有工具脚本中的测试菜单代码(Tools菜单下的测试项)
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user