My actual code:
function Update() {
if(Input.GetMouseButtonDown(0)) {
Debug.Log("foto");
Application.CaptureScreenshot(Application.dataPath + "Screenshot.png");
}
}
I need the path for the output of every photo for this function.
Thanks!
You can save files to Application.persistentDataPath. Unity apps do not have write permissions to Application.dataPath
on Android or iOS devices.
Also, don't forget to join the path and the folder name with a forward slash:
Application.CaptureScreenshot(Application.persistentDataPath + "/Screenshot.png");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With