Took a look at it and it's actually a Unity bug, filed a report, see where it goes.
There are methods that rely on
RenderTextures but they don't capture the UI.
In the meantime, I asked this on Stack Overflow as well and got some handy answer that saves all pixel info from the screen like so:
public KeyCode takeScreenshotKey = KeyCode.S;
public int screenshotCount = 0;
private void Update()
yield return new WaitForEndOfFrame();
string path = "Screenshots/"
+ "_" + screenshotCount + "_" + Screen.width + "X" + Screen.height + "" + ".jpeg";
Texture2D screenImage = new Texture2D(Screen.width, Screen.height);
//Get Image from screen
screenImage.ReadPixels(new Rect(0, 0, Screen.width, Screen.height), 0, 0);
//Convert to png
byte imageBytes = screenImage.EncodeToPNG();
//Save image to file
Note that this script though works, it has to be modified for the sake of convenience. It also worths mentioning that if you use
Outline on your UI elements, those will become transparent if saved as
.png, so I used