Error message when using ReadPixels

ReadPixels was called to read pixels from system frame buffer, while not inside drawing frame.
UnityEngine.Texture2D:ReadPixels(Rect, Int32, Int32)

I get this error every time I try to call ReadPixels. It works as expected and I’m able to read the pixels, but the errors flood my console whenever it’s called.

Does anyone know how to stop this error message?

It appears that putting it in a coroutine and adding WaitForEndOfFrame() worked. I suggest this be added to the script reference documentation.