Unity3D UI 来自 json 的文本字符串未正确显示
Unity3D UI Text string from json not correctly showing
我从 JSON 获取字符串并将此字符串应用到 UI Text.text.
textAZ = jsonObject.GetString("haqqinda_az").ToString();
aboutText.text = textAZ;
但它在游戏中显示 \n 和 \r 符号 Window。我想要这个符号打破新的行。图片在这里:
换行符已经转义,但您可以撤消:
textAZ = jsonObject.GetString("haqqinda_az").ToString();
textAZ = textAZ.Replace("\n","\n").Replace("\r","\r");
aboutText.text = textAZ;
我从 JSON 获取字符串并将此字符串应用到 UI Text.text.
textAZ = jsonObject.GetString("haqqinda_az").ToString();
aboutText.text = textAZ;
但它在游戏中显示 \n 和 \r 符号 Window。我想要这个符号打破新的行。图片在这里:
换行符已经转义,但您可以撤消:
textAZ = jsonObject.GetString("haqqinda_az").ToString();
textAZ = textAZ.Replace("\n","\n").Replace("\r","\r");
aboutText.text = textAZ;