Search Unity

How do you disable the HDRP debug menu?

Discussion in 'General Graphics' started by Flubzies, Mar 17, 2019.

  1. Flubzies

    Flubzies

    Joined:
    Jun 5, 2017
    Posts:
    5
    upload_2019-3-17_9-9-11.png

    You can enable it when you push down on both thumbsticks.
    It's useful for debugging but I'd like to disable it for my final builds.
    And I can't seem to find an option to do so?
    There's a Runtime Debug Display toggle in the HDRP Asset but that doesn't seem to do anything.
     
  2. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    Uncheck this box:
     
    PhilSA likes this.
  3. Flubzies

    Flubzies

    Joined:
    Jun 5, 2017
    Posts:
    5
    Thanks for the reply, but I've mentioned it above, "There's a Runtime Debug Display toggle in the HDRP Asset but that doesn't seem to do anything."
    It still shows up in the editor and the final build. If this option definitely disables it for you, then there's something wrong with my setup and I'll look into it more. I'll also try to check it in a test project.
     
  4. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    It will still be toggleable in the editor, but it will be disabled for the build.

    Fun fact: Left Ctrl-Backspace will toggle it too.
     
  5. Flubzies

    Flubzies

    Joined:
    Jun 5, 2017
    Posts:
    5
    Unity - 2018.3.0f2
    HDRP - 4.1.0
    Made a new default HDRP project, and that toggle doesn't seem to do anything.
    Tested on a non-development build with the option enabled and disabled.
    I've got the fully updated package versions installed on my personal project with the same issue.
     
  6. Flubzies

    Flubzies

    Joined:
    Jun 5, 2017
    Posts:
    5
    I posted on Reddit as well. Fixed thanks to u\Alibient_Interactive, find the file:
    High Definition RP\Runtime\Core\Debugging\DebugUpdater.cs
    And comment out everything in Update.
    This seems to be a bug with the HDRP settings. You wouldn't want this menu to be accessed on a final build.
     
    Seith and Yukihirotkyo like this.
  7. Schaeferyn

    Schaeferyn

    Joined:
    Sep 3, 2013
    Posts:
    1
    Has anyone found a way to disable this thing in 2020.2? I found DebugUpdater and commented it out, but it's considered an "immutable asset" and is reloaded from the package every time I change it.

    It sure is annoying as hell when testing UI or functionality that happens to use a similar hotkey. It's kinda infuriating that there's a whole menu that just appears out of nowhere that's buried away in the debug settings that can't seem to be disabled.
     
    Stuart_Warp likes this.
  8. Lyrcaxis

    Lyrcaxis

    Joined:
    Dec 8, 2017
    Posts:
    7
    You can hide it if you want, with:
    Code (CSharp):
    1. static class DebugUpdaterDestroyer {
    2.     // this will make the component standalone.. no need to manually add it to any GameObjects to trigger
    3.     [RuntimeInitializeOnLoad] static void InitUpdaterDestroyer() => new GameObject("").AddComponent<DebugUpdaterDestroyerInternal>();
    4.  
    5.     // making this private and a sub-class will hide it from the 'Add Component' menu.
    6.     class DebugUpdaterDestroyerInternal : MonoBehaviour {
    7.         void Start() {
    8.             Destroy(GameObject.Find("[Debug Updater"]));
    9.             Destroy(this.gameObject);
    10.         }
    11.     }
    12. }

    ..or if you have your coroutine utilities set up:
    Code (CSharp):
    1. static class DebugUpdaterDestroyer {
    2.     [RuntimeInitializeOnLoad] static void DestroyDebugUpdater() => CoroutineUtilities.RunNextFrame(() => Destroy(GameObject.Find("[Debug Updater"]));
    3. }
     
    Last edited: May 1, 2022
  9. Infinite-3D

    Infinite-3D

    Joined:
    Jan 5, 2020
    Posts:
    40
    An easy way to disable it is by just running
    Code (CSharp):
    1. UnityEngine.Rendering.DebugManager.instance.enableRuntimeUI = false;
    in any script
     
    FuriousEX and Dontom1 like this.
  10. Dontom1

    Dontom1

    Joined:
    Apr 3, 2021
    Posts:
    2
    Effective, thanks very much!