Hi,
I developed a MR application for an iPhone, which used Vuforia's Model Target feature, that we are currently looking at porting over to a proper headset. We got a Magic Leap headset on loan and I've been trying to get the digital eyewear sample working without luck (Vuforia Digital Eyewear Sample | Packs | Unity Asset Store).
Nothing happened when I ran the sample with my added model target, in the console I had a PERMISSION_ERROR and saw that Vuforia was not initialising. I've allowed access to the camera when the application is launched as well as double checking that access to the camera is allowed through Settings -> Privacy -> Camera on the ML device.
After some digging it seems like delayed initialisation of Vuforia could work with an additional script to request permissions at runtime but I'm not sure how to implement that and also surprised that the sample would not work out of the box.
Any help appreciated on how to fix this or if there are any obvious permission settings I'm missing.
Unity Editor version: 2022.3.42f1
ML2 OS version: 1.8.0
Unity SDK version: v2.4.0
Host OS: Windows
Error messages from logs:
AndroidPlayer "Ml_Magic Leap 2@ADB:GA62XT0100K1:0" Vuforia Engine initialization failed: PERMISSION_ERROR
PERMISSION ERROR
One or more permissions required by Vuforia Engine are missing or not granted by user.
For example, the user may have denied camera access to this app.
In this case, you can enable camera access in Settings:
Settings > Privacy > Camera > Test
Also verify that the camera is enabled in:
Settings > General > Restrictions.
DefaultInitializationErrorHandler:SetErrorCode(VuforiaInitError)
DefaultInitializationErrorHandler:OnVuforiaInitializationError(VuforiaInitError)
System.Reflection.RuntimeMethodInfo:Invoke(Object, BindingFlags, Binder, Object, CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object)
System.Delegate:DynamicInvokeImpl(Object)
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate(Delegate, Object)
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling(Action`1, T)