public void TakeScreenshot()
 {
     ISN_PHPhotoLibrary.RequestAuthorization((status) => {
         if (status == ISN_PHAuthorizationStatus.Authorized)
         {
             ToggleCaputreScreenshot(true);
             ISN_UIImagePickerController.SaveScreenshotToCameraRoll((result) => {
                 if (result.IsSucceeded)
                 {
                     StartCoroutine(ShareableScreenshot());
                     Debug.Log("screenshot saved saved");
                 }
                 else
                 {
                     CaputreScreenshotResult(false);
                     Debug.Log("Error: " + result.Error.Message);
                 }
             });
         }
         else
         {
             CaputreScreenshotResult(false);
             Debug.Log("Permission denied");
         }
     });
 }
示例#2
0
 protected override void IOSRequestAccess(Action <AuthorizationStatus> callback)
 {
     ISN_PHPhotoLibrary.RequestAuthorization((status) => {
         if (status == ISN_PHAuthorizationStatus.Authorized)
         {
             callback.Invoke(AuthorizationStatus.Granted);
         }
         else
         {
             callback.Invoke(AuthorizationStatus.Denied);
         }
     });
 }
 public void TakeScreenshot()
 {
     ISN_PHPhotoLibrary.RequestAuthorization((status) => {
         if (status == ISN_PHAuthorizationStatus.Authorized)
         {
             UIManager.GetComponent <UIManagerScript>().ToggleCaputreScreenshot(true);
             ISN_UIImagePickerController.SaveScreenshotToCameraRoll((result) => {
                 if (result.IsSucceeded)
                 {
                     StartCoroutine(ShareableScreenshot());
                 }
                 else
                 {
                     UIManager.GetComponent <UIManagerScript>().CaputreScreenshotResult(false);
                 }
             });
         }
         else
         {
             UIManager.GetComponent <UIManagerScript>().CaputreScreenshotResult(false);
         }
     });
 }