Sam*_*olm 1 c# unity-game-engine
我有以下代码:
textPath = Application.streamingAssetsPath + "JSONFiles/text_to_text.txt";
StreamReader reader = new StreamReader(textPath);
string text = reader.ReadLine();
string[] colour = text.Split(",");
m_textMeshPro.SetText(text);
reader.Close();
Run Code Online (Sandbox Code Playgroud)
该代码正在从 txt 文件中读取一行。我在 unity 内部使用这个。但是,当我将鼠标悬停在 split 函数 (",") 内的参数下方时,有一条红线。它说“参数 1:无法从 'string' 转换为 'char'。
归档时间: |
|
查看次数: |
2563 次 |
最近记录: |