Search Unity

Higher resolution ReadPixels ?

Discussion in 'Scripting' started by keithsoulasa, Nov 8, 2014.

  1. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    1,984
    Hi all , is their anyway to do ReadPixels with higher resolution.

    I know about Application.CaptureScreenshot, but I need to take a screenshot and upload it , can I do that with application.CaptureScreenshot ?
     
  2. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,288
    CaptureScreenshot will write a PNG file to disk. This does not work on web player. If you are not doing a web player game, just upload the PNG that gets created. If you are doing a web player game, then you'll need to solve this in a different way. One way might be to jitter the camera, and capture multiple copies of the rendered scene. Then compose the captured scenes together.
     
  3. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    1,984
    Thanks Graham , anyway to save this to a temp directory so we delete it right after upload.

    Also , how do I wait until CaptureScreenshot has finished writing to disk , I tried this before and it couldn't find the file after capturing the screenshot
     
  4. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,288
    You get to specify the file path, so guess you can write into a temp folder.

    CaptureScreenshot shouldn't return until the file is written.