Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IEnumerator captureScreen(){
- yield return new WaitForEndOfFrame();
- Texture2D tex = new Texture2D((int)pixelWidth, (int)pixelHeight, TextureFormat.RGB24, true);
- tex.ReadPixels (new Rect(1,0,pixelWidth,pixelHeight),0,0);
- tex.Apply();
- mapTexture = tex;
- cam.enabled = false;
- done = true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement