Advertisement
ensiferum888

ScreenCapture

Jan 21st, 2014
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.30 KB | None | 0 0
  1. IEnumerator captureScreen(){
  2.         yield return new WaitForEndOfFrame();
  3.         Texture2D tex = new Texture2D((int)pixelWidth, (int)pixelHeight, TextureFormat.RGB24, true);
  4.         tex.ReadPixels (new Rect(1,0,pixelWidth,pixelHeight),0,0);
  5.         tex.Apply();
  6.         mapTexture = tex;
  7.         cam.enabled = false;
  8.         done = true;
  9.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement