Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Fix for Unity Demo as Web Cam Texture is 16x16 and The Demo Does Not Work

Open
#497 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
50/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
csharp, unity
Domain
game-dev

Research direction

The bug is in the Unity sample's Update method, where the WebCamTexture width and height are read into W and H before the camera has reported its real resolution. Start there and confirm the texture is 16x16 at startup. The proposed guard returns early until the width exceeds 16, but check that it cannot stall if the camera never starts. Done means the demo decodes the live image instead of a 16x16 patch.

Written by the indexing model from the issue text.

Description

The problem is that the web cam texture starts up with a resolution of 16x16 and the example code does not wait until the resolution is actually set. So the reader is looking at a tiny 16x16 portion of the data and will never "see" the image appropriately.

A quick fix to modify the demo:

    void Update()
    {
        if (camTexture.width <= 16) return;

        W = camTexture.width;
        H = camTexture.height;
 // ... and then the rest
Dominant language
C#
Stars
3.1k
Forks
704
Avg merge
13d 17h
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from micjahn/ZXing.Net

All issues in micjahn/ZXing.Net

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.