string[] split;
/// <summary>
/// 读取text配置文件
/// </summary>
void ReadLanguageConfig()
{
string textAsset = Application.streamingAssetsPath + "/xxx.txt";
using (FileStream fs = new FileStream(textAsset, FileMode.Open, FileAccess.Read))
{
using (StreamReader sr = new StreamReader(fs))
{
split = sr.ReadToEnd().Split(',');
}
}
for (int i = 0; i < split.Length; i++)
{
LIST.Add(split[i]);
}
for (int i = 0; i < LIST.Count; i++)
{
print(LIST.ToString());
}
}
创建text使用UTF-放在streamingasset里面