In my project, I need to write a big size file (about 2MB) to the persistantDataPath, and every time it does writing, the frame will drop, there is a slight lag, because I write it in one frame.
Is there any way to write a file using WWW or some other IEnumerator? so that I can use coroutine to do it.
I tried POST using WWW, it doesn’t work.
I tried system.thread, and I tried multi-thread, the system will have lag, and the deltatime between lag frame is ALWAYS 1/3, that’s 0.33333333, always, no matter I’m using filestream.BeginWrite, or start a new thread with thread.start().
can someone provide a valid way to deal with it?