From c6963b337c6ae179bf53aa6b7fdea2c44e820dc4 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Mon, 5 Jul 2021 16:43:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=9F=B3=E9=A2=91=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GameEditor/FrameTool/ImportResWindow.cs | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Editor/GameEditor/FrameTool/ImportResWindow.cs b/Assets/Scripts/Editor/GameEditor/FrameTool/ImportResWindow.cs index f37bfabff3..a84cb8749b 100644 --- a/Assets/Scripts/Editor/GameEditor/FrameTool/ImportResWindow.cs +++ b/Assets/Scripts/Editor/GameEditor/FrameTool/ImportResWindow.cs @@ -16,6 +16,7 @@ namespace GameEditor.Util string tag = Environment.CurrentDirectory; string tag1 = "Assets/ManagedResources"; string importTexturePath; + string importAudioPath; string targetPath; string[] usedPath; bool[] usedPathSelect; @@ -30,6 +31,7 @@ namespace GameEditor.Util } void InitData() { + importAudioPath = PlayerPrefs.GetString("ImportResWindow_importAudioPath"); importTexturePath = PlayerPrefs.GetString("ImportResWindow_importTexturePath"); targetPath = PlayerPrefs.GetString("ImportResWindow_targetPath"); usedPath = new string[] { @@ -64,6 +66,23 @@ namespace GameEditor.Util usedPathSelect[i] = EditorGUILayout.Toggle(usedPath[i], usedPathSelect[i]); } + EditorGUILayout.BeginHorizontal(); + GUILayout.Label("导入音频"); + importAudioPath = GUILayout.TextArea(importAudioPath); + if (GUILayout.Button("Select", GUILayout.ExpandWidth(false))) + { + filePath = ProcessUtil.OpenFileWin(importTexturePath, "*.*"); + if (filePath != null && filePath.Length > 0) + { + importTexturePath = filePath[0]; + PlayerPrefs.SetString("ImportResWindow_importTexturePath", importTexturePath); + } + } + EditorGUILayout.EndHorizontal(); + + + + EditorGUILayout.BeginHorizontal(); GUILayout.Label("导入路径"); GUILayout.Label(tag1); @@ -176,7 +195,7 @@ namespace GameEditor.Util Directory.Delete(desPath,true); AssetDatabase.Refresh(); } - Debug.Log("图片导入完成"); + Debug.Log("导入完成"); } } }