【发布时间】:2019-02-04 13:10:45
【问题描述】:
我有以下代码:
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();
代码正在从 txt 文件中读取一行。我在统一内使用它。但是,拆分函数(“,”)内的参数下方有一条红线,当我将鼠标悬停在它上面时。它说“参数 1:无法从 'string' 转换为 'char'。
【问题讨论】: