IEnumerator SceneToTexture() { // Run through everything and render each camera // setup variables if not done already for (int i = 0; i < instances; i++) { // Connect camera to renderTexture and render cameras[i].targetTexture = renderTextures[i]; cameras[i].Render(); RenderTexture.active = renderTextures[i]; // Asynchrously request rendertexture data from GPU UnityEngine.Rendering.AsyncGPUReadbackRequest request = UnityEngine.Rendering.AsyncGPUReadback.Request(renderTextures[i], 0); while (!request.done) { yield return(new WaitForEndOfFrame()); } pixels[i] = request.GetData <byte>().ToArray(); // We want to get our pixel data in png form, which requires creating a new texture2D Texture2D tex = new Texture2D(width, height, TextureFormat.RGB24, false); tex.LoadImage(pixels[i]); pixels[i] = tex.EncodeToPNG(); // Clean-up RenderTexture.active = null; } }