Bearbeiten

Freigeben über


ScreenshotUtility.CaptureScreenshot(String, Int32, Boolean, Camera) Method

Definition

Captures a screenshot with the current main camera's clear color.

public static bool CaptureScreenshot (string path, int superSize = 1, bool transparentClearColor = false, UnityEngine.Camera camera = default);
static member CaptureScreenshot : string * int * bool * UnityEngine.Camera -> bool
Public Shared Function CaptureScreenshot (path As String, Optional superSize As Integer = 1, Optional transparentClearColor As Boolean = false, Optional camera As Camera = Nothing) As Boolean

Parameters

path
String

The path to save the screenshot to.

superSize
Int32

The multiplication factor to apply to the native resolution.

transparentClearColor
Boolean

True if the captured screenshot should have a transparent clear color. Which can be used for screenshot overlays.

camera
UnityEngine.Camera

The optional camera to take the screenshot from.

Returns

True on successful screenshot capture, false otherwise.

Applies to