구글 드라이브 시트에서 불러와서 쓰는 데이터가 있는데 플레이를 하면 텅빈 텍스트만 계속 노출이 되는 것이다.
스크립트 에러인 줄 알고 몇 시간을 코드 뜯어보고 바꿔보고 했는데...
혹시나 하고 뒤늦게 Json 파일을 봤더니 뜬금없이 \r 문제가 중간에 끼여있었다.
using System.Text.RegularExpressions;
using 선언을 해주고
string cutWord = "['\r']";
string stringList[i] = Regex.Replace(stringList[i], cutWord, "");
'\r'을 삭제해 주는 간단한 코드.
'Unity Error' 카테고리의 다른 글
[유니티] NullReferenceException: Object reference not set to an instance of an object (0) | 2022.04.02 |
---|---|
unable to install additional SDK platform. (0) | 2021.06.27 |
Screen position out of view frustum (0) | 2021.06.27 |