kefniark / UnityBarcodeScanner

Simple Unity Barcode Scanner
http://kefniark.github.io/UnityBarcodeScanner/
Do What The F*ck You Want To Public License
226 stars 68 forks source link

What am I missing? #36

Closed leollama closed 5 years ago

leollama commented 6 years ago

Hi! Great work on the QR Scanner! I'm trying to add it to my project, but I seem to be missing something...I am using Unity 2018.2.10f1, building for Android 4.4 (even tried going 5.0, but no go). I get the demo working, with simple and continuos working great, but I can't start my own scene.

I've even exported the boot , simple and continuos scenes to a new project, built it and it does not work, the phone freezes. The boot scene loads ok, but when I click simple or continuous, it freezes, doesn't even ask for the permission.

I've tried editing the AndroidManifest.xml and nothing...I did notice one thing, when I build your demo, the app asks for authorization to use the camera (upon clicking simple or continuous) but on my project it does not. What am I missing? Is there another setting on the project or libraries that I'm missing? It all seems to be there, and the editor show no errors...

Thanks!

leollama commented 6 years ago

Right, so, my issue was with the GoogleVR SDK for Unity. While using it, you have to make a little change in your manifest, specifically this line:

Because of the VR experience GoogleVR disabels the permissions dialog, therefore I was unable to start the camera and read the QR codes! So changing that line on the manifest did the trick and all is good. Remember that you have to add a modified AndroidManifest.xml to the "Assets/Plugins/Android/" folder in your Unity project for it to work.