3 - Unity3D: Application.CaptureScreenshot, Texture2D.ReadPixels RenderTexture.
: Application.CaptureScreenshot. , , . Application.persistentDataPath Application.dataPath + "/../", . , - . , , . , Coroutine, , , -.
, , - :
bool creatingFile = false;
string fileName = "Screenshot.png"
function Update() {
if(Input.GetMouseButtonDown(0)) {
Application.CaptureScreenshot(fileName);
creatingFile = true;
}
if (creatingFile) {
string origin = System.IO.Path.Combine(Application.persistentDataPath, fileName);
string destination = "/sdcard/ScreenCapture/" + fileName;
if (System.IO.File.Exists(origin)) {
System.IO.File.Move(origin, destination);
creatingFile = false;
}
}
}