- Home /
Question by
voropserg · Mar 05, 2019 at 03:45 PM ·
build-errorscreenshotscreencapture
Failed to store screenshot in build
Failing to store the screen shot in build (Windows) , while in editor everything works
public string TakeScreenshot()
{
if (!Directory.Exists(screenshotFolderName))
Directory.CreateDirectory(screenshotFolderName);
string screenshotFilename;
do
{
screenshotCount++;
screenshotFilename = screenshotFolderName + "/screenshot_" + screenshotCount + ".png";
} while (File.Exists(screenshotFilename));
ScreenCapture.CaptureScreenshot(screenshotFilename);
return screenshotFilename;
}
Logs from build:
Failed to store screen shot (E:/Projects/Unity/DigitalGraffity/BuildDev/DigitalGraffity_Data/Screenshots/screenshot_1.png)
(Filename: C:\buildslave\unity\build\Modules/ScreenCapture/CaptureScreenshot.cpp Line: 82)*
Comment
Actually scren capture works, but only while saving to the Application.persistentDataPath
. Is there any way to save to the custom directory ?
Your answer
Follow this Question
Related Questions
ScreenCapture.CaptureScreenshot skips frames 1 Answer
Screenshot resolution using ScreenCapture 1 Answer
capture a screen shot and show in the album folder 1 Answer
Take screenshot and use it as texture using ScreenCapture 2 Answers
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers