Unity(ar) 截屏 对焦 -- Vuforia

  • 1,截屏
  public  void Photograph()
    {
        KZ.GetComponent().enabled = false;
        //  Application.CaptureScreenshot("Screenshot.png"); 
        StartCoroutine(ScreenshotManager.Save("MyScreenshot", "MyApp", true));
    }
  • 2,相机对焦
    void Start()
    {
        Vuforia.CameraDevice.Instance.SetFocusMode(Vuforia.CameraDevice.FocusMode.FOCUS_MODE_CONTINUOUSAUTO);
    }
    
    void Update()
    {
#if UNITY_EDITOR
        if (Input.GetMouseButtonUp(0))
#elif UNITY_ANDROID || UNITY_IPHONE
            if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began)  
#endif
        {
            Vuforia.CameraDevice.Instance.SetFocusMode(Vuforia.CameraDevice.FocusMode.FOCUS_MODE_CONTINUOUSAUTO);
        }
    }

你可能感兴趣的:(Unity(ar) 截屏 对焦 -- Vuforia)