Search Unity

Resolved How to use the "shader" keyword/filter in assets search window?

Discussion in 'Editor & General Support' started by vxdcxw, Feb 27, 2023.

  1. vxdcxw

    vxdcxw

    Joined:
    Mar 21, 2014
    Posts:
    15
    Hello,

    I'm looking for a way to find all materials using a specific shader. For that, I supposed I could use the "shader:" keyword/filter inside an index when doing a search with Unity "Seach" tool.

    I created an index with only materials inside, the index report to have the "shader:" filter, but my attempts to use it all failed and I cannot find any discussion in the forum or in the documentation. All others filters are well-referenced in the manual here, but the "shader" keyword is missing



    My attempts so far (based on other filters):
    • shader:SHADER_NAME
    • shader:ShaderCategory/SHADER_NAME
    • shader:"SHADER_NAME"
    • shader:"Shader Category/SHADER_NAME"
    I'm out of idea right now. Hope someones can help me find a way to achieve my search, thank you!
     
  2. vxdcxw

    vxdcxw

    Joined:
    Mar 21, 2014
    Posts:
    15
    Haha, I found it!

    The correct syntax is...
    • shader:"Assets/Full/Path/To/Shader/File.shader"
    (replace the extension with ".shadergraph" if it's a shadergraph)

    So it's working, but a bit cumbersome to provide the full path, I wish we could just use the name of the name
     
    borgstation and SF_FrankvHoof like this.