"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Custom external camera driver example for Unity

Hi!

 

Recently, I've been trying to implement custom driver interface and then integrate it with Unity.

However, even though I followed all instructions written on the Vuforia's documentation, it crashes whenever Vuforia's ImageTarget and ARCamera.are added to a scene.

Are there any examples that I can refer to for Unity? 

From what I understand, I need to set `VuforiaConfiguration.Instance.DeviceTracker.UseThirdPartySeethroughEyewear` to `true` and then initialize `VuforiaApplication.Instance`. Is that correct?

void Start()     {

      VuforiaConfiguration.Instance.DeviceTracker.UseThirdPartySeethroughEyewear = true;

      string driverName = ""; #if UNITY_EDITOR       driverName = $"{NativeConstants.NativeLibrary}.dll"; #elif !UNITY_EDITOR && UNITY_ANDROID       driverName = $"{NativeConstants.NativeLibrary}.so"; #endif

      VuforiaApplication.Instance.Initialize(driverName, System.IntPtr.Zero);       VuforiaApplication.Instance.OnVuforiaInitialized += OnVuforiaInitialized;     }

    private void OnVuforiaInitialized(VuforiaInitError error)     {       Debug.Log("OnVuforiaInitialized");       Debug.Log(error);       VuforiaARCAmera.SetActive(true);       VuforiaImageTarget.SetActive(true);     }

 

Thanks

 

Best Regards,

Wilson