Version: 2017.2

ScreenCapture.CaptureScreenshot

Cambiar al Manual
public static void CaptureScreenshot (string filename, int superSize= 0);

Parámetros

filename Pathname (nombre de la ruta) para guardar el archivo screenshot.
superSize Factor por el cual se incrementará la resolución.

Descripción

Hace una captura de pantalla y la almacena en la ruta filename como un archivo PNG.

Si el archivo ya existe, será sobreescrito.

En plataformas móviles, el nombre del archivo se agrega a la ruta de datos persistida. Mirar también Application.persistentDataPath para más información.

When superSize parameter is larger than 1, a larger resolution screenshot will be produced. For example, passing 4 will make the screenshot be 4x4 larger than it normally would. This is useful to produce screenshots for printing.

    function OnMouseDown() {
        Application.CaptureScreenshot("Screenshot.png");
    }

En Android esta función retorna inmediatamente. El screenshot resultante está disponible después.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961