美文网首页Unity (AR)
Unity(ar) 截屏 对焦 -- Vuforia

Unity(ar) 截屏 对焦 -- Vuforia

作者: U3D界金城武 | 来源:发表于2017-03-24 18:40 被阅读70次
    • 1,截屏
      public  void Photograph()
        {
            KZ.GetComponent<xuanzhuan>().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

        本文链接:https://www.haomeiwen.com/subject/ojafottx.html