Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Higher resolution ReadPixels ?

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

  1. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,126
    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

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    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:
    2,126
    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

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    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.