- Home /
Capturing the frames online without slowing the pace of the game
How to capture the background frames while a unity game is running?
I already knew
cam.Render();
Texture2D image = new Texture2D(cam.targetTexture.width, cam.targetTexture.height); image.ReadPixels(new Rect(0, 0, cam.targetTexture.width, cam.targetTexture.height), 0, 0);
and then
converting the texture into an image using EncodeToPng/JPG
But what I have seen using this extra cam.render and encoding to png and capturing the frames differently slow down the operation drastically, takes huge time to do this.
How can I directly get the textures or frames online while a game is running, maybe from the OpenGL calls which GPU are using?
Does anyone have any idea how to achieve this?
Your answer
![](https://koobas.hobune.stream/wayback/20220612154355im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Anti aliasing with sprites 0 Answers
Texture is rendering black? 1 Answer
How to render part of an object 2 Answers
How can i get my quad to only render my texture without stretching it? 1 Answer
Mipmap view not working in editor. 0 Answers