I need to convert a byte [] to string in C# and Unity without losing much of a Frame Per Second. I'm currently using the WWW class to fetch the text file, but when I use WWW.text, as the file is too large and causes a drop in FPS. Is there any way to make the conversion incrementally, without delay too long.
WWW file = new WWW(path);
yield return file;
string text= file.text;
I use this to read an full file(one .OBJ) and i need to read all text. Line to line or all text to one string to split after. To read text without drop in FPS, i make this.
WWW file = new WWW(path);
yield return file;
string text= file.bytes;
if file are to much big, WWW.text, drop FPS, then i need use WWW.bites.
In Unity useyield return null;
to process another frame.
If process need too much time to execute then drop FPS(in case WWW.text);