flutter-unity-view-widget icon indicating copy to clipboard operation
flutter-unity-view-widget copied to clipboard

Failed to initialize vuforia

Open FarahBedoui96 opened this issue 3 years ago • 1 comments

Error displaying Unity activity in Flutter for the second time run ( it works only the first time).

The error says that it fails to initialize vuforia. After close examination of the bug it appeared that when the unity activity asks me the first time to use the camera (permission) and I put the permission to "only when using the app" , the next time I run the app the vuforia error shows. I was able to figure out that the permission is the main cause because when I changed it to "always ask" from the settings and run the app unityactivity shows again with no error. in the configuration of the package nothing asks to put a permission in flutter or request it and even if I request it from flutter the same error appears. I guess something in the native code should change so that the permission has to be requested every time I open the unity activity and not put as granted all the time because vuforia needs to ask for permission everytime. Can anyone help me in this? I have a project to be released as soon as possible.

FarahBedoui96 avatar Jan 03 '22 10:01 FarahBedoui96

Hi @FarahBedoui96 sorry about the issue you are having. So the package largely depends on Unity as a Library which is managed by the Unity Team. The question can be raised with the unity forums or maybe it might have been ask.

However I believe handling this kind of permission request in the unity project itself might just solve the problem. I hope this helps.

juicycleff avatar Jan 05 '22 07:01 juicycleff