Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Discussion Hey Unity you really need to look at bug reports more carefully

Discussion in 'Editor & General Support' started by alloystorm, Sep 26, 2023.

  1. alloystorm

    alloystorm

    Joined:
    Jul 25, 2019
    Posts:
    84
    I reported a bug back in July about a problem with HDR output. Basically after you turned HDR output on for your project you cannot turn it off anymore. When you request to turn if off it will obey for 1 frame and then immediately revert back to true again. In the mean time you can observe the screen flicker and then back to the original state.

    I uploaded the example project and it was confirmed. And then 2 and half months later I got this response today saying that it is not an issue.

    The response suggested that the problem is I'm using "Mouse.current.leftButton.isPressed" and suggests that changing it to "Mouse.current.leftButton.wasReleasedThisFrame" will resolve the problem.

    I'll attach the code so you can see what's wrong with that statement

    Code (CSharp):
    1.     void Update()
    2.     {
    3.         if (HDROutputSettings.main.available) {
    4.             if (Mouse.current.leftButton.isPressed) {
    5.                 if (!HDROutputSettings.main.HDRModeChangeRequested && HDROutputSettings.main.active) {
    6.                     HDROutputSettings.main.RequestHDRModeChange(false);
    7.                 }
    8.             }
    9.             Debug.Log("hdr " + HDROutputSettings.main.active + " " + HDROutputSettings.main.HDRModeChangeRequested);
    10.         }
    11.     }
    Now the code here is just an example I put together quickly to demonstrate the problem, it does make sense to use wasReleasedThisFrame here but if you read further down the code you'll see that this is actually irrelavant. Because the key part is "HDROutputSettings.main.RequestHDRModeChange(false);" which is setting the state to false. It is not toggling the state, so even if this triggers for every frame it still wouldn't have caused the problem I observed. I did change it to use wasReleasedThisFrame instead and unsurprisingly the problem is exactly the same.

    I think the guy who looked at the issue either didn't have a HDR capable monitor to reproduce the issue properly, or they totally didn't understand what the problem was. I'm not trying to blame anyone but this kind of response totally doesn't meet any reasonable quality standard.

    The reviewer who wrote the confirmation for this issue actually did a really great job since they actually understood what the problem was, tested it on multiple Unity versions and even listed Unity versions that have this issue and versions that don't have the issue. If the guy who were assigned to resolve read their colleagues' review they'll know that the problem can't be what they think it is.
     
    Deleted User likes this.
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    37,215
    Source control lets you revert anything and everything.

    PROPERLY CONFIGURING AND USING ENTERPRISE SOURCE CONTROL

    I'm sorry you've had this issue. Please consider using proper industrial-grade enterprise-qualified source control in order to guard and protect your hard-earned work.

    Personally I use git (completely outside of Unity) because it is free and there are tons of tutorials out there to help you set it up as well as free places to host your repo (BitBucket, Github, Gitlab, etc.).

    You can also push git repositories to other drives: thumb drives, USB drives, network drives, etc., effectively putting a complete copy of the repository there.

    As far as configuring Unity to play nice with git, keep this in mind:

    https://forum.unity.com/threads/prefab-links-keep-getting-dumped-on-git-pull.646600/#post-7142306

    I usually make a separate repository for each game, but I have some repositories with a bunch of smaller test games.

    Here is how I use git in one of my games, Jetpack Kurt:

    https://forum.unity.com/threads/2-steps-backwards.965048/#post-6282497

    Using fine-grained source control as you work to refine your engineering:

    https://forum.unity.com/threads/whe...grammer-example-in-text.1048739/#post-6783740

    Share/Sharing source code between projects:

    https://forum.unity.com/threads/your-techniques-to-share-code-between-projects.575959/#post-3835837

    Setting up an appropriate .gitignore file for Unity3D:

    https://forum.unity.com/threads/removing-il2cpp_cache-from-project.1084607/#post-6997067

    Generally the ONLY folders you should ever source control are:

    Assets/
    ProjectSettings/
    Packages/

    NEVER source control Library/ or Temp/ or Logs/
    NEVER source control anything from Visual Studio (.vs, .csproj, none of that noise)

    Setting git up with Unity (includes above .gitignore concepts):

    https://thoughtbot.com/blog/how-to-git-with-unity

    It is only simple economics that you must expend as much effort into backing it up as you feel the work is worth in the first place. Digital storage is so unbelievably cheap today that you can buy gigabytes of flash drive storage for about the price of a cup of coffee. It's simply ridiculous not to back up.

    If you plan on joining the software industry, you will be required and expected to know how to use source control.

    "Use source control or you will be really sad sooner or later." - StarManta on the Unity3D forum boards
     
  3. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,136
    I'd just reopen the issue, and explain what you've explained above. There's very little chance that the people involved in fixing this bug are going to stumble upon your post here.

    Unfortunately, it's often the nature of bug reporting that the person receiving the bug doesn't properly understand the issue the first time it's reported. I know I'm guilty of that. Best you can do is just calmly correct them and request that the issue be reopened. I assume your simple repro project doesn't accidentally have some other code that's calling
    RequestHDRModeChange(true)
    ?
     
  4. alloystorm

    alloystorm

    Joined:
    Jul 25, 2019
    Posts:
    84
    Thanks. That's exactly what I did.

    The example project is literally just the HDRP template plus one single script that contains the code I quoted above. Nothing else.
     
    dgoyette likes this.