Hi,
i've set up a button that capture the screenshot, but it always replace the one previously created.
How can i assign to a screenshot a progressive number (or like H:M:S)?
I'm using this code actually:
if (GUI.Button (new Rect(0,0,150,30), "ScattaFoto")) { Application.CaptureScreenshot("shot.png"); //here i need to replace the name each screenshot made if (QCARRuntimeUtilities.IsPlayMode()) { // if in PlayMode, the screenshot will be saved // to the project directory Debug.Log ("Saved screenshot"); } else { // if running on Device, the screenshot will be saved // to the Application.persistentDataPath directory Debug.Log ("Saved screenshot to " + Application.persistentDataPath + "/"); } }
thanks in advance
Ok. The only thing that comes to my mind is to check if the Date is actually reporting a different value each time (you can log it and see the actual value), and/or if maybe the filename (using the date/time) is too long and for some reasons it gets clamped... this could explain why you always get the same.