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. Dismiss Notice

Feature Request Ability to dynamically expose / hide shader properties

Discussion in 'Shader Graph' started by JoeTheWiltshire, Sep 24, 2020.

  1. JoeTheWiltshire

    JoeTheWiltshire

    Joined:
    Apr 23, 2013
    Posts:
    5
    This would be a great feature for ease-of-use without having to write custom editors for every custom shader:

    The ability to dynamically toggle the "exposed" boolean of each property via other properties / nodes.
    Use case:
    I have my main uv tiling node controlling my texture mapping.
    I want to be able to (optionally) check a boolean "separate diffuse map tiling"
    This will switch my branch from using the default uv tiling property to a separate uv tiling property, and expose the separate uv tiling property in the editor.

    This is possible (and happens by default I believe) in the unreal shader editor and is quite handy for complex shaders without having to get into the shader code.

    See image below for example.
    Cheers,
    Joe.

    upload_2020-9-24_13-42-43.png
     

    Attached Files:

    PutridEx likes this.
  2. Shaunyowns

    Shaunyowns

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    328
  3. Mariusz-Born7

    Mariusz-Born7

    Joined:
    Sep 4, 2015
    Posts:
    40
    Anything new on this topic? I would also like to have an option to use for example Float property or Texture property depending on Texture being selected or not. Texture selected -> Float property hidden. Texture not selected (none) -> Float property shown.