'CameraDevice'不包含'CameraDirection'的定义

问题描述 投票:0回答:1

我正在使用代码来正面和背面切换相机。但现在这段代码不起作用。如何解决这个问题?

if (CameraDevice.Instance.GetCameraDirection() == CameraDevice.CameraDirection.CAMERA_BACK)
        {
            SelectCamera(CameraDevice.CameraDirection.CAMERA_FRONT);
        }
        else 
        {
            SelectCamera(CameraDevice.CameraDirection.CAMERA_BACK);
        }
android unity3d augmented-reality vuforia
1个回答
2
投票

Api Reference可以看出,CameraDirection中没有CameraDevice了。

你可以试试VuforiaConfiguration.Instance.Vuforia.CameraDirection

更有可能它不起作用因为你更新了你的Vuforia并且不再支持前置摄像头,所以你应该使用旧版本的Vuforia。

© www.soinside.com 2019 - 2024. All rights reserved.