/// <summary>
/// 读取所有声音文件
/// </summary>
private List<string> ReadTxt()
{
List<string> audiosList = new List<string>();
string path = Application.streamingAssetsPath + "/Audios.txt";
string[] strs = File.ReadAllLines(path);
for (int i = 0; i < strs.Length; i++)
{
string tmpLine = strs[i];
if (!string.IsNullOrEmpty(tmpLine))
{
audiosList.Add(tmpLine);
}
}
return audiosList;
}
网友评论