Log in or register to post comments

sceenshot help

March 23, 2015 - 7:24am #1
im using this script, but do not save the screenshot in ios.



using UnityEngine;
using System.Collections;

public class CUCUCU : MonoBehaviour {

	void OnGUI() {
		if (GUI.Button (new Rect(50,50,150,30), "Capture")) {
			string filename = "shot.png";
			Application.CaptureScreenshot(filename);
			
			if (QCARRuntimeUtilities.IsPlayMode()) {
				// if in PlayMode, the screenshot will be saved
				// to the project directory
				Debug.Log ("Saved screenshot to " + filename);
			}
			else {
				// if running on Device, the screenshot will be saved
				// to the Application.persistentDataPath directory
				Debug.Log ("Saved screenshot to " + Application.persistentDataPath + "/" + filename);
			}
		}
	}
}

 

sceenshot help

March 23, 2015 - 7:28am #3

im using this script, but do not save the screenshot. help please

sceenshot help

March 23, 2015 - 7:27am #2
using UnityEngine;
using System.Collections;

public class CUCUCU : MonoBehaviour {

	void OnGUI() {
		if (GUI.Button (new Rect(50,50,150,30), "Capture")) {
			string filename = "shot.png";
			Application.CaptureScreenshot(filename);
			
			if (QCARRuntimeUtilities.IsPlayMode()) {
				// if in PlayMode, the screenshot will be saved
				// to the project directory
				Debug.Log ("Saved screenshot to " + filename);
			}
			else {
				// if running on Device, the screenshot will be saved
				// to the Application.persistentDataPath directory
				Debug.Log ("Saved screenshot to " + Application.persistentDataPath + "/" + filename);
			}
		}
	}
}

 

Log in or register to post comments