添加音频导入工具
parent
570db27b9f
commit
c6963b337c
|
@ -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("导入完成");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue