unity3D-AR开发之摄像机对焦

1.今天在做我们公司产品的时候涉及到了摄像机对焦的问题,我用的unity3D开发的,很简单的一段代码就能解决我们对焦的问题。public class AutoFocus : MonoBehaviour {// Use this for initializationvoid Start (){StartCoroutine(TriggerContinuousFocusIfSet());}// Update is called once per framevoid Update () {}private IEnumerator TriggerContinuousFocusIfSet(){yield return new WaitForEndOfFrame();Vuforia.CameraDevice.Instance.SetFocusMode(Vuforia.CameraDevice.FocusMode.FOCUS_MODE_CONTINUOUSAUTO);}}

你可能感兴趣的:(unity3D-AR开发之摄像机对焦)