- Home /
Question by
hawk-hawk-studio · Oct 28, 2018 at 11:57 AM ·
camerazoomsave file
Save picture from camera with zoom
Hi!
I am developing a game in which I take a picture with the camera. I used a slider to apply zoom to the picture. The photo is plotted in a Texture2D and the zoom is applied to the Texture2D but when I save it into a file there is no any zoom and it is shown without any zoom (x1). Here is the code:
camera_renderer.material.SetTextureScale("_MainTex", new Vector2(camera_zoom, camera_zoom));
camera_renderer.material.SetTextureOffset("_MainTex", new Vector2((1 - camera_zoom) / 2, (1 - camera_zoom) / 2));
camera_texture.SetPixels(backCam.GetPixels());
camera_texture.Apply();
backCam.Pause();
snap = camera_texture;
Could you help me to solve this problem? Thank you very much!!!
Comment