Hello there,
Having bit of a problem here, I using the Application.CaptureScreenshot to capture screenshot on my app, I manage to do it, Below is my code:
public var hit : RaycastHit;
public var GuiCam : Camera;
function Update ()
{
var ray = GuiCam.ScreenPointToRay (Input.mousePosition);
if (Input.GetMouseButtonDown (0)) //Returns true during the frame the user touches the object
{
if (Physics.Raycast (ray, hit, 100))
{
if (hit.collider.tag == "camera")
{
Application.CaptureScreenshot ("screenshot.jpg");
}
}
}
}
Now the problem is, when I closed my app and go to Android gallery I cannot see the screenshot that had been taken earlier. I have to turn off and on my Android device to see all the picture that had been taken, it’s like the gallery doesn’t refresh automatically. How do I solved this problem.
I try look on the web and found this System.IO.Directory.GetFiles (); but not sure how to use it, is this the solution or there is other?