I need to integrate Zxing with vuforia to make a QR code scanning app in Unity? I have no idea how to integrate Zxing with Vuforia in unity.Can someone guide me how to do this?I have Zxing .dll files and Vuforia unity package.Thanks in Advance.
相关问题
- Unity - Get Random Color at Spawning
- Unity3D WebGL Headless not rendering
- How make QR code from object of a class or several
- ZXing not reading Brazilian Barcode bills (interle
- Unity3D loading resources after build
相关文章
- Programmatically setting and saving the icon assoc
- Omnisharp in VS Code produces a lot of warnings ab
- Call non-static methods on custom Unity Android Pl
- ZXing on Android PDF417
- How can a game created in Unity can run on an Andr
- Android cameraSource.stop() causing app to freeze
- How to add Persistent Listener to Button.onClick e
- Placing an object in front of the camera
I was looking for integrating Zxing with vuforia in Unity today.
The first thing to do is to download the dll from : https://zxingnet.codeplex.com/ and copy the unity dll into your Plugins folder (which should be in the Assets folder)
Then, I managed to found some examples (some of theses is outdated) :
http://ydaira.blogspot.fr/2012/09/how-to-decode-qr-codes-using-unity3d.html
https://github.com/Redth/ZXing.Net/blob/master/Clients/VuforiaDemo/Assets/VuforiaScanner.cs
After merging theses examples and simplify them, I got something like this (which is placed of the ARCamera prefab) :
I manage to make it works in an AVD (Android Virtual Device), so it will works on a real device.
If you have lags during scanning, this code should help you. I used KDelli's answer and used another thread for the code of decoding qr.
If you use Unity 5.x and 64-bit Windows you may get an error
Solution is simple as stated in the question Unity3d - Failed to load 'Assets/Plugins/QCARWrapper.dll'
To use Vuforia with Unity 64 bit, just move the QCARWrapper DLLs from
/Plugins
to/Plugins/x86.
These are the DLLs:Select the
QCARWrapper.bundle
in the Unity Project view (located under Assets > Plugins ), so that its settings are shown in the Unity Inspector Change the settings ofQCARWrapper.bundle
in the Unity inspector from Any Platform to Standalone + Editor.Than it works like a charm.