构建我的Unity项目时,此代码不起作用

问题描述 投票:-1回答:1

这个代码通过按下播放在我的统一项目中工作,但是当我构建它时这个代码不起作用,为什么?

void ReadString()
{
    string path = "Assets\\Turkey\\daglar.txt";
    FileStream akis = new FileStream(path, FileMode.Open, FileAccess.Read);
    StreamReader reader = new StreamReader(akis, Encoding.GetEncoding("iso-8859-9"), false);
    while (true)
    {
        dag = reader.ReadLine();

        if (dag != null)

            daglar.Add(dag);

        else break;
    }
    reader.Close();``
}
c# unity3d
1个回答
-1
投票

“资产\土耳其\ daglar.txt”;改为“Assets \ Turkey \ daglar.txt”;

你为什么做了2次?

© www.soinside.com 2019 - 2024. All rights reserved.