void OnGUI()
    {
        GUILayout.Label("Example scene showing: \n1. how to save a screenshot\n" +
                        "2. how to save an image from your assets");

        if (GUILayout.Button("Take Screenshot", GUILayout.Width(200), GUILayout.Height(80)))
        {
            StartCoroutine(ScreenshotManager.Save("MyScreenshot", "MyApp", true));
        }

        if (saved)
        {
            GUILayout.Label("Screenshot was successfully saved");
        }

        GUILayout.Space(40);

        GUILayout.Label(texture);

        if (GUILayout.Button("Save " + texture.name, GUILayout.Width(200), GUILayout.Height(80)))
        {
            StartCoroutine("SaveAssetImage");
        }

        if (saved2)
        {
            GUILayout.Label(texture.name + " was successfully saved");
        }
    }
Ejemplo n.º 2
0
 public void MakeScreenshot()
 {
     if (shot != null)
     {
         AudioSource.PlayClipAtPoint(shot, Vector3.zero);
     }
     StartCoroutine(ScreenshotManager.Save("SafePhone", "SafePhone", true));
 }
    public void Taking()
    {
        savedScreenshot = 1;
        status.text     = "Saving Photo...\nBrowse it at Gallery application's LKDF Interact album.";
        status.transform.GetComponentInChildren <Animation> ().Play("Appear");

        StartCoroutine(ScreenshotManager.Save("LKDF", "LKDF Interact", true));
    }
 void OnClick()     //Use Gallary Screenshot
 {
     audio.Play();
     NGUITools.SetActive(RestartBtn, false);
     NGUITools.SetActive(TakePhotoBtn, false);
     animation.Play();
     StartCoroutine(ScreenshotManager.Save("MediaHub", "MediaHub"));
 }
Ejemplo n.º 5
0
 void btnCaptureScreen()
 {
     if (GUI.Button(new Rect((Screen.width / 5f) * 3 + 10, 10, (Screen.width / 5f) - 20, (Screen.width / 5f) - 20), texScreenshot, "")) //if button Screenshot is press
     {
         //Clear screen when function Capture Screen excute
         GlobalVariable.Instance.getCapture = true;
         StartCoroutine(ScreenshotManager.Save("MyScreenshot", "PaintAR", true)); //save image capture to gallery
         if (GlobalVariable.Instance.savedCapture)
         {
             AndroidUtil.showToast("Saved image to gallery.");                                       //push toast to scene
         }
     }
 }
Ejemplo n.º 6
0
    /// <summary>拍照</summary>
    public void Shot()
    {
        //辨識目標數量
        int trackAmount = 0;

        foreach (TrackableStatusManager i in TSM)
        {
            //辨識目標為辨識狀態
            if (i.Status == TrackableStatusManager.TurnStates.TRACK)
            {
                //辨識目標數量增加
                trackAmount++;
                //啟動拍照程序
                StartCoroutine(ScreenshotManager.Save(fileName, SuccessShot, FailShot, albumName: albumName, callback: true));
                break;
            }
        }
        //無辨識目標
        if (trackAmount == 0)
        {
            FailShot();
        }
    }
Ejemplo n.º 7
0
 /// <summary> 截屏保存到相册 </summary>
 public void ScrrenShoot(string fileName, string albumName = "MyScreenshots", bool callback = false)
 {
     PageManager.Instance.StartCoroutine(ScreenshotManager.Save(fileName, albumName, callback));
 }
Ejemplo n.º 8
0
 /// <summary>拍照</summary>
 public void Shot()
 {
     //啟動拍照程序
     StartCoroutine(ScreenshotManager.Save(fileName, SuccessShot, FailShot, albumName: albumName, callback: true));
 }
Ejemplo n.º 9
0
 public void MakeScreenshot()
 {
     SoundController.instance.Play("camshot", .05f, 1f);
     StartCoroutine(ScreenshotManager.Save("SafePhone", "SafePhone", true));
 }