Log in or register to post comments

The type name 'CameraDirection' does not exist'

March 24, 2019 - 5:08am #1

Hi there!

After I update my Vuforia from 8.0 to 8.1.7 I got this error:

NatCamCapturePhoto.cs(22,26): error CS0426: The type name 'CameraDirection' does not exist in the type 'CameraDevice'


this is the code:

    private Texture2D _CapturedPhoto;

    private CameraDevice.CameraDirection _CameraDevice;

    private DeviceCamera _DeviceCamera;


    private void Start()


        CameraDevice.Instance.GetSelectedCameraDirection(out _CameraDevice);


        if (_CameraDevice == CameraDevice.CameraDirection.CAMERA_BACK)

            _DeviceCamera = DeviceCamera.RearCamera;

        else if (_CameraDevice == CameraDevice.CameraDirection.CAMERA_FRONT)

            _DeviceCamera = DeviceCamera.FrontCamera;




            _DeviceCamera = DeviceCamera.RearCamera;


            _DeviceCamera = DeviceCamera.FrontCamera;




        NatCam.StartPreview(_DeviceCamera, OnStart);



Also I have code to turn camera:

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

using ARCamera = Vuforia.CameraDevice;

public class SwitchARCamera : MonoBehaviour


public void SwitchCamera()




  ARCamera.CameraDirection dir = ARCamera.Instance.GetCameraDirection();

  if (dir == ARCamera.CameraDirection.CAMERA_FRONT)


  else ARCamera.Instance.Init(ARCamera.CameraDirection.CAMERA_FRONT);




Can you please help me to fix it?

Best Regards,


The type name 'CameraDirection' does not exist'

October 2, 2020 - 11:59pm #4

Why was camera support removed? ... this breaks my project functionality in upgrading 

The type name 'CameraDirection' does not exist'

July 13, 2020 - 6:46am #3


I am developing an application that should use vuforia and zxing to scan a QR code and then a pop up should appear and the camera should close to save battery until the user closes the pop up. Now my issue is that when I disable Vuforia Behaviour, the read value of the scanner is stuck at the last value read and the scanner doesn't work any more. I really need to solve this problem to move on. I tried disabling zxing and enabling it again with vuforia and nothing changed. I also tried to apply the standard Camera Settings on the AR Camera but it was giving me an error on CameraDevice.CameraDirection If anyone can help me I would be thankful

The type name 'CameraDirection' does not exist'

March 26, 2019 - 9:23am #2


Front camera support was removed in Vuforia 8.1. This means that the camera direction is no longer relevant so the APIs were updated.



Vuforia Engine Support

Log in or register to post comments