Пример #1
0
    // For Save
    IEnumerator CaptureScreen()
    {
        yield return(new WaitForEndOfFrame());

        // Save to PhotoLibrary
        Texture2D screenShot = ScreenCapture.Capture();

        if (saveAsPng)
        {
            bool withTransparency = false;
            if (withTransparency)
            {
                // PNG with transparency
                LoadTextureFromImagePicker.SaveAsPngWithTransparencyToPhotoLibrary(screenShot, gameObject.name, "OnFinishedSaveImage");
            }
            else
            {
                // PNG
                LoadTextureFromImagePicker.SaveAsPngToPhotoLibrary(screenShot, gameObject.name, "OnFinishedSaveImage");
            }
        }
        else
        {
            // JPG
            LoadTextureFromImagePicker.SaveAsJpgToPhotoLibrary(screenShot, gameObject.name, "OnFinishedSaveImage");
        }
    }
Пример #2
0
    // For Save
    IEnumerator CaptureScreen()
    {
        yield return(new WaitForEndOfFrame());

        // Save to PhotoLibrary
        Texture2D texScreenShot = ScreenCapture.Capture();

        LoadTextureFromImagePicker.SaveAsPngToPhotoLibrary(texScreenShot, this.name, "OnFinishedSaveImage");
    }