Search Unity

Check if using LWRP or HDRP in editor?

Discussion in 'Editor & General Support' started by tsangwailam, Jun 15, 2019.

  1. tsangwailam

    tsangwailam

    Joined:
    Jul 30, 2013
    Posts:
    280
    I am create tools to work with LWRP and HDRP. I want to detect if the project is using LWRP or HDRP in editor. Anyone have suggestion?
     
  2. I would poke around somewhere here:
    https://docs.unity3d.com/ScriptReference/Rendering.GraphicsSettings-renderPipelineAsset.html

    If it's empty, you are in built-in pipline.
    And if it is UnityEngine.Experimental.Rendering.HDPipeline.HDRenderPipelineAsset then it's HDRP.

    But it is certainly possible that there is a simpler way to do it, although IDK about it and IDK if this method actually works.