docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Subgraph Dropdown node

    The Subgraph Dropdown node is a node representation of a Dropdown property. It allows you to create a custom dropdown menu on a Subgraph node in its parent Shader Graph. You can specify the number of options that appear in the dropdown menu, and their names.

    After you create a Dropdown property and add a Dropdown node to a Subgraph, the Subgraph node in any parent Shader Graph displays with a dropdown control:

    An image of the Graph window, that displays a parent Shader Graph with a Subgraph node. The Subgraph node has a dropdown menu because the Subgraph has a Dropdown property and contains a Dropdown node.

    Create Node menu category

    The Subgraph Dropdown node isn't accessible from the Create Node menu.

    To add a Subgraph Dropdown node to a Subgraph:

    1. In the Shader Graph window, open a Subgraph.

    2. In the Blackboard, select Add (+) and select Dropdown.

    3. Enter a name for your new Dropdown property, and press Enter.

    4. Select your Dropdown property and drag it onto your graph to create a new Subgraph Dropdown node.

    5. Select your new Dropdown node in your graph or the Dropdown property in the Blackboard and open the Graph Inspector.

    6. Select the Node Settings tab.

    7. In the Entries table, select Add to the list (+) to add a new option to your dropdown. Each Entry adds a corresponding input port to your node. To remove an Entry, select its handle in the list and select Remove selection from the list (-).

    8. (Optional) In the Default list, select the default Entry that you want Shader Graph to select on your property.

    An image of the Graph window, that displays a Dropdown node in the Graph Editor. The Dropdown property is selected in the Blackboard and the Graph Inspector shows the available options for configuring the Dropdown property.

    Compatibility

    The Subgraph Dropdown node is supported on the following render pipelines:

    Built-In Render Pipeline Universal Render Pipeline (URP) High Definition Render Pipeline (HDRP)
    Yes Yes Yes

    Ports

    Note

    The Subgraph Dropdown node's number of input ports and their names directly correspond to the settings you specify in the Graph Inspector's Node Settings tab. The node always has one output port.

    A Subgraph Dropdown node's input ports always have the DynamicVector type. This means that you can make a connection to an input port from any node that outputs a float, Vector 2, Vector 3, Vector 4, or Boolean value. For more information, see Dynamic Data Types.

    It has one output port:

    Name Type Description
    Out DynamicVector The selected option from the dropdown menu on the parent Shader Graph's Subgraph node. This value can also be the specified Default for the property in the Graph Inspector's Node Settings tab.

    Example graph usage

    In the following example, a Subgraph Dropdown node changes the UV channel it sends to the Subgraph's Output node. The selection on the Subgraph node in the parent graph changes whether the Subgraph outputs UV1 or UV0. If the Subgraph is used in multiple Shader Graphs, the Subgraph Dropdown node can change the UV channel output without changing the Subgraph:

    An image of the Graph window. The first input port on a Subgraph Dropdown node connects to a UV node and receives UV0. The second input port connects to a UV node and receives UV1. The Subgraph Dropdown node sends its output to the Subgraph's Output node.

    Related nodes

    The following nodes are related or similar to the Subgraph Dropdown node:

    • Subgraph node

    Did you find this page useful? Please give it a rating:

    Thanks for rating this page!

    Report a problem on this page

    What kind of problem would you like to report?

    • This page needs code samples
    • Code samples do not work
    • Information is missing
    • Information is incorrect
    • Information is unclear or confusing
    • There is a spelling/grammar error on this page
    • Something else

    Thanks for letting us know! This page has been marked for review based on your feedback.

    If you have time, you can provide more information to help us fix the problem faster.

    Provide more information

    You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:

    You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:

    You've told us there is information missing from this page. Please tell us more about what's missing:

    You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:

    You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:

    You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:

    You've told us this page has a problem. Please tell us more about what's wrong:

    Thank you for helping to make the Unity documentation better!

    Your feedback has been submitted as a ticket for our documentation team to review.

    We are not able to reply to every ticket submitted.

    In This Article
    • Create Node menu category
    • Compatibility
    • Ports
    • Example graph usage
    • Related nodes
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)