Comments (10)
Following up with more info, it seems to be related to some post process that HoloToolkit is doing... so not sure if this falls under anyone's jurisdiction. The call stack reveals:
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:560) PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:127) UnityEditor.BuildPipeline:BuildPlayer(String[], String, BuildTarget, BuildOptions) HoloToolkit.Unity.BuildSLNUtilities:PerformBuild(BuildInfo) (at Assets/HoloToolkit/Build/Editor/BuildSLNUtilities.cs:219) HoloToolkit.Unity.BuildDeployTools:BuildSLN(String, Boolean) (at Assets/HoloToolkit/Build/Editor/BuildDeployTools.cs:30)
from zxing.net.
I think the ZXing.Unity build isn't perfect. But I can't test it myself. I looked a little bit around in the internet
and found some posts which describe solutions for the same or a similar problem.
Perhaps that would help you:
https://forums.hololens.com/discussion/3263/zxing-unity-barcode-dll-issue
https://forums.hololens.com/discussion/2337/has-anyone-been-able-to-successfully-use-zxing-in-their-hololens-app
https://mtaulty.com/2016/12/28/windows-10-uwp-qr-code-scanning-with-zxing-and-hololens/
It would be great if someone with more experience on unity can give me some hints (or a pull request) with changes in the zxing codebase to get it running out of the box.
from zxing.net.
Thanks for the links. I think there are a lot of options to try. My current hypothesis is that there is an incompatibility with the HoloToolkit. But I still have a lot of options to try. I'll check in if I make any progress today.
from zxing.net.
@micjahn I found this user who has the same problem.
https://forum.unity3d.com/threads/zxing-net-and-browsableattribute.429933/
We need to remove references to the System.ComponentModel.BrowsableAttribute
class/namespace. Do you think that the Unity build of ZXing.Net can go without this namespace? How hard would it be to remove?
(BTW, the other option mentioned in the thread produces a litany of other errors due to IL2CPP incompatibilities. I think removing the BrowsableAttribute
references is lower friction).
I tried to build ZXing.Net right out of the box but got a bunch of errors. I'm not sure if it's a VS config issue, or what the problem is. If you are able to walk me through how to build ZXing.Net, maybe I can work to remove BrowsableAttribute
. If you know how to safely remove reference to it in the Unity build of ZXing, that would be even better. :)
from zxing.net.
Update: I think that we need to wrap the [Browsable] attributes in #if !UNITY
. I can't compile the Unity build to find out (see my other thread), but I've copied the entire .NET 3.5 project into Unity and have been slowly combing through errors. That browsable attribute is one of the pieces that HoloLens doesn't like.
from zxing.net.
I don't understand why other users get it running with the published assembly.
Anyway, ZXing.Net should be buildable out of the box. If you use VS 2012 or newer you have to disable
parallel builds because the different projects stay in the same directory and using the same obj directory.
I will remove the Browsable attribute next time and build a new binary. Hopefully this week.
from zxing.net.
@micjahn It does work on Unity, just not a UWP application built by Unity (published as a Windows Store App). The error comes when Unity compiles for UWP, specifically.
So I guess the directive would be #if !UNITY && UWP
. I'd be happy to pursue making this pull request if you can help me with my problem building the Unity-specific DLL.
from zxing.net.
I made a special build without the Browsable attribute.
Please try it with your UWP app.
https://www.dropbox.com/s/9tzhrnvqco6csf1/zxing.unity.dll?dl=0
from zxing.net.
Thanks! I'm going to try this asap.
from zxing.net.
Next version of ZXing.Net will included binaries for unity without the Browseable attribute. Source code changes are already within the repository.
from zxing.net.
Related Issues (20)
- UPC/EAN Extension 2/5 does not read the 2/5 digit extension
- Can someone finally fix the example usage in README?
- Don't decode QR_CODE HOT 3
- ZXing.Net doesn't seem to be able scan more complicated PDF417 barcodes HOT 12
- EPC QR Code (European Payments Council) Not Decoded HOT 3
- Support for Latin-1 in BARCODE-128 HOT 4
- Upgrade SixLabors.ImageSharp - current version has vulnerabilities HOT 1
- UPC_A's error message is wrong.
- The image for PLESSEY is vertically tiny. HOT 6
- The sides of UPC_A's image could be slightly cut out. HOT 1
- Centering PDF_417 Barcodes and Unstable Width/Height HOT 1
- Barcode as small part of image HOT 1
- Barcode generator: unpredictable whitespace padding around it depending on requested Width
- Upgrading to Magick.Net 13.7.0 breaks ZXing.Magick HOT 1
- ZXing for WinUI-3 HOT 1
- Barcode DATA_MATRIX code = BCD88888888-1 to BCD88888888-99 Don't look right they are not a sqaure
- Undecodable QR code generated
- Recognizes the UPC_E format on the Qr_CODE HOT 5
- Cannot create GenericMultipleBarcodeReader from ZXing.OpenCV.BarcodeReader HOT 2
- Digitally sign ZXing NuGet package assemblies HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zxing.net.