Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Screenshot()
- {
- //if you want to save on Application.persistentDataPath, file on this path is remove when app is uninstal
- //string screenShotName = "AndroidUltimateScreenShot.png";
- //string path = Application.persistentDataPath + "/" + screenShotName;
- string FileName = ScreenshotName + "-" + DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + "-" + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".jpg";
- string folderPath = utilsPlugin.CreateFolder(utilsPlugin.GetDCIMPath() + "/RSToolKit", 0);
- LastUsedPath = "";
- if (!folderPath.Equals("", StringComparison.Ordinal))
- {
- LastUsedPath = folderPath + "/" + FileName;
- //note: we added new required variable to pass which is screenShotName to determined what image format to use
- //jpg or png, if format is not given set default to jpg format
- StartCoroutine(AUP.Utils.TakeScreenshot(LastUsedPath, FileName));
- DialogManager.ShowAlert("The image has been saved! Would you like to share it?", ShareScreenshot, "Share", "Image Saved!", new ImageData(StandardIcon), null, "Cancel");
- }
- }
- private void ShareScreenshot()
- {
- sharePlugin.ShareImage("RSToolkit Hiscores Graph", "check out this graph of hiscores I created using RSToolKit!", LastUsedPath);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement