Hi… i don’t know why i am having this issue … but i have this script to capture the screen shot … i applied it to a button … the screen blink when i press the button but when i open the gallery of my tablet it doesn’t show the captured screen shot … … when i test this code on PC or in unity editor it works fine… it creates the folder at the folder “D:/Omer Hussain/Amigo-Projects/ChristmasStory/ScreenShots”; with the folder name “ScreenShots” and in that folder saves the image with image name “Christmas”… i want the same functionality on the device… i tried to find the folder as well the image with their names but device doesn’t show anything but works fine on PC :/…
using UnityEngine;
using System.Collections;
public class ScreenShot : MonoBehaviour {
//string folderPath = "D:/Omer Hussain/Amigo-Projects/ChristmasStory/ScreenShots";
string folderPath = "/storage/sdcard0/ChristmasShots";
string fileName = "Christmas.png";
void OnMouseDown()
{
if(!System.IO.Directory.Exists(folderPath))
System.IO.Directory.CreateDirectory(folderPath);
Application.CaptureScreenshot(folderPath + "/"+fileName);
}
}