A game about forced loneliness, made by TACStudios
1# Subgraph Dropdown node
2
3The 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.
4
5After 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:
6
7
8
9## Create Node menu category
10
11The Subgraph Dropdown node isn't accessible from the Create Node menu.
12
13To add a Subgraph Dropdown node to a Subgraph:
14
151. In the Shader Graph window, open a Subgraph.
16
172. In the Blackboard, select **Add** (+) and select **Dropdown**.
18
193. Enter a name for your new Dropdown property, and press Enter.
20
214. Select your Dropdown property and drag it onto your graph to create a new Subgraph Dropdown node.
22
235. Select your new Dropdown node in your graph or the Dropdown property in the Blackboard and open the Graph Inspector.
24
256. Select the **Node Settings** tab.
26
277. 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.
28 To remove an Entry, select its handle in the list and select **Remove selection from the list** (-).
29
308. (Optional) In the **Default** list, select the default Entry that you want Shader Graph to select on your property.
31
32
33
34## Compatibility
35
36The Subgraph Dropdown [!include[nodes-compatibility-all](./snippets/nodes-compatibility-all.md)] <!-- ALL PIPELINES INCLUDE -->
37
38## Ports
39
40> [!NOTE]
41> 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.
42
43A 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](Data-Types.md#dynamic-data-types).
44
45It has one output port:
46
47| **Name** | **Type** | **Description** |
48| :--- | :----------- | :---------- |
49| 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. |
50
51
52## Example graph usage
53
54In 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:
55
56
57
58
59## Related nodes
60
61<!-- OPTIONAL. Any nodes that may be related to this node in some way that's worth mentioning -->
62
63[!include[nodes-related](./snippets/nodes-related.md)] Subgraph Dropdown node:
64
65- [Subgraph node](Sub-graph-Node.md)