/// <summary> /// CaptureScreenshot() runs async, so we check the screenshot path to see if there is a file there, once a file is found, then we share it /// </summary> /// <param name="screenshotPath">Path the screenshot was saved to</param> /// <param name="text">Text to share with the screenshot</param> IEnumerator WaitForScreenshotToSaveThenShare(string screenshotPath, string text) { while (!File.Exists(screenshotPath)) { yield return(new WaitForSecondsRealtime(0.05f)); } if (OnFrameAfterScreenshot != null) { OnFrameAfterScreenshot.Invoke(); } NativeShareKit.ShareScreenshotAndText(text, screenshotPath, true, "Select app to share screenshot on"); }
/// <summary> /// Shows the alert box /// </summary> public void ShowAlert() { NativeShareKit.ShowAlert(alertTitle, alertMessage, alertDismissButtonText); }
/// <summary> /// Shows a toast with the given text /// </summary> /// <param name="text">Text to display on the toast</param> public void ShowToast(string text) { NativeShareKit.ShowToast(text); }
/// <summary> /// Shows a toast /// </summary> public void ShowToast() { NativeShareKit.ShowToast(toastText); }
/// <summary> /// Shares the text to an app /// </summary> /// <param name="text">Text to share</param> public void ShareTextToApp(string text) { NativeShareKit.ShareText(text); }