- Home /
Save to a separate system folder
Hey there, I'm trying to save a screenshot to a separate system folder, as opposed to the Assets folder. I'm using a custom encoder which I've modified as opposed to the usual Application.CaptureScreenshot
to see how they compare, and everything is working beautifully. The only problem is that I would love for my screenshots to save to a different file directory than in the Unity Assets folder. I'm currently using:
File.WriteAllBytes(Application.dataPath + "/" + screenshotName + sysTime + sysDate + ".png", bytes);
I realise Application.dataPath
references the Assets folder, but that was only as a test because I could not figure out a solution to save a .png to a separate folder.
If someone could help me, that would be greatly appreciated!
Thanks! Klep
Answer by senad · Mar 08, 2012 at 09:39 AM
Can you use an absolute file path? Something like "C:\Users\Yourname\filename" on windows.
Yeah, sorry, I feel like an idiot! I already tried this before and got it working. Thanks for your help! :)
Your answer
Follow this Question
Related Questions
Question about screenshots and facebook integration 1 Answer
How to save runtime generated texture in Webplayer to hard drive? 1 Answer
How to find ScriptableObject from folder by name or id 1 Answer
Create .png file from script, then import as asset 1 Answer
Screen Cap as Transparent PNG without RenderTexture 0 Answers