Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question How to access the Rendering Debugger options via script?

Discussion in 'Getting Started' started by KenZenKen, Apr 9, 2024.

  1. KenZenKen


    Jan 2, 2024
    Hi , I am creating an editor only tool in Unity that wants to create presets so i can set the rendering debugger options inside like the Material Overrides to something of choice. This is so that i can quickly render it out from the camera view as textures using another script. However, I am finding difficulties in finding the API ( i dont think its accessible ) to call it via a script.

    If so, is there another work around to obtain the passes? I am very curious on what's going behind the scenes for the Rendering Debugger! I would just like to control the options it is selecting via a script in Editor mode only.

    I am using URP. Camera is using a renderer asset that is using deferred rendering mode. ( as forward rendering does not get it to show on the Game View ). I've tried looking into the source code such as the `DebugViewEnums.cs`, `DebugDisplaySettingsMaterial.cs`, `DebugHandler.cs` and `DebugViewEnum.cs.hlsl`

    Any help would be appreciated!! :)
    The image below shows the enum i am trying to select via script.