I have the below C# code executing upon clicking a button on an android device. I have no idea why it’s not saving. Am I missing some code?
using UnityEngine;
using System.Collections;
public class ScreenShot : MonoBehaviour
{
public static string ScreenShotName(string testbed)
{
return string.Format("{0}/Screenshot/{1}-{2}.png", Application.persistentDataPath, testbed, System.DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss"));
}
public void OnClickSaveImage()
{
string name = ScreenShotName("test");
Application.CaptureScreenshot(name);
}
}