Search Unity

[SOLVED]ScreenCapture.CaptureScreenshot with super sampling is simply scaling up lower resolution UI

Discussion in 'UGUI & TextMesh Pro' started by gtzpower, Jan 7, 2018.

  1. gtzpower

    gtzpower

    Joined:
    Jan 23, 2011
    Posts:
    318
    I am trying to use the super sampling feature of ScreenCapture.CaptureScreenshot(). I am having a problem where all UI elements look like they are being captured at the current resolution and scaled up (so the images/text are very blocky). 2d sprites and 3d objects work fine.

    Here is the code I am using:
    Code (CSharp):
    1. ScreenCapture.CaptureScreenshot("Assets/Image.png", 6);
    Here is an example of the result. Same sprite, on the left it is shown with a UI Image, and the right is a 2d sprite renderer:
    https://imgur.com/a/SVYH0

    Any ideas on how I can make supersampling work with UI? If not, does anyone know if one of the plugins for taking screenshots allows for supersampling of UI?
     
    arcandio likes this.
  2. gtzpower

    gtzpower

    Joined:
    Jan 23, 2011
    Posts:
    318
    So, of course, I figure out a solution as soon as I post. I just setup a resolution preset in the dropdown at the top of the game window with the target resolution I want to capture and take the the screenshot without supersampling.

    It wouldn't be a solution in a build, so there may be an issue here still. I'll submit a bug report.