Hello everyone!
I’m trying to implement instant screen grabbing script for VR application and can’t overcome the problem of using new method: Graphics.CopyTexture.
Here are main code samples:
-
Initialization:
rt = new RenderTexture(widht, height, 24, RenderTextureFormat.ARGB32);
tex = new Texture2D(widht, height, TextureFormat.ARGB32, false); -
Trying to copy texture:
cam.targetTexture = rt;
cam.Render();
Graphics.CopyTexture(rt, tex);
After launching that code I got an error saying:
Graphics.CopyTexture called with mismatching mip counts (src 1 dst 9)
UnityEngine.Graphics:CopyTexture(Texture, Texture)
What am I doing wrong?
Thanks!