Why doesn’t a QR code appear when I hit “Play” in Unity using the MixedReality-QRCode-Sample project?

Pei Yunqiang 5 Reputation points
2024-01-02T08:44:01.59+00:00

I’m trying to implement a feature in HoloLens 2 that scans a QR code and renders a virtual model. I’ve been following the MixedReality-QRCode-Sample project (https://github.com/microsoft/MixedReality-QRCode-Sample) recommended by Wang in this Microsoft Q&A post (https://video2.skills-academy.com/en-us/answers/questions/1461102/how-to-implement-a-time-dependent-virtual-number-o). However, I’ve encountered a similar issue to these developers on GitHub (https://github.com/microsoft/MixedReality-QRCode-Sample/issues/21). Despite no errors or warnings in the console, hitting “Play” in the Unity editor does not cause a QR code to pop up in the scene in front of the user. This issue remains unresolved and seems to be affecting more and more people. I’m using Unity 2020.3.38.f1 and Visual Studio 2022. Any guidance on how to resolve this would be greatly appreciated.

HoloLens Development
HoloLens Development
HoloLens: A family of Microsoft self-contained, holographic devices that enable engagement with digital content and interaction with holograms in the surrounding environment.Development: The process of researching, productizing, and refining new or existing technologies.
398 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ying Li - MSFT 1,200 Reputation points Microsoft Vendor
    2024-01-02T09:54:18.63+00:00

    Hello, Welcome to Microsoft Q&A,

    If a virtual model still doesn’t appear after you scan a physical QR code? In this project, a physical QR code, present in the real world, should be scanned using you HoloLens device first. When the physical QR code is read, a virtual rectangle object will be placed at the QR code coordinates. Then, when you click the virtual rectangular object, it will direct you to the website the QR code links you to. So, it’s not that a virtual QR code or a QR code picture will automatically appear in the scene at the beginning of the application.


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.