Giter Club home page Giter Club logo

Comments (10)

motionsmith avatar motionsmith commented on June 19, 2024

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.

micjahn avatar micjahn commented on June 19, 2024

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.

motionsmith avatar motionsmith commented on June 19, 2024

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.

motionsmith avatar motionsmith commented on June 19, 2024

@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.

motionsmith avatar motionsmith commented on June 19, 2024

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.

micjahn avatar micjahn commented on June 19, 2024

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.

motionsmith avatar motionsmith commented on June 19, 2024

@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.

micjahn avatar micjahn commented on June 19, 2024

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.

motionsmith avatar motionsmith commented on June 19, 2024

Thanks! I'm going to try this asap.

from zxing.net.

micjahn avatar micjahn commented on June 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.