Description
The ConnectionPlug.Input
field is a member of the ConnectionPlug
enumeration within the Editor.NodeEditor
namespace. This enumeration is used to define the types of connection plugs available in a node editor environment, specifically distinguishing between input and output plugs.
The Input
field represents a plug that is intended to receive data or signals from other nodes. It is typically used to define where a node can accept connections from other nodes' output plugs.
Usage
Use the ConnectionPlug.Input
field when you need to specify that a particular connection point on a node is an input. This is useful in scenarios where you are setting up or configuring nodes in a node-based editor, and you need to clearly define the direction of data flow.
For example, when creating a new node, you might specify that certain plugs are inputs to ensure that they can only receive data from other nodes' outputs.
Example
// Example of using ConnectionPlug.Input in a node setup
public class MyNode : Node
{
public MyNode()
{
// Define an input plug for this node
AddPlug("InputData", ConnectionPlug.Input);
}
private void AddPlug(string name, ConnectionPlug plugType)
{
// Implementation for adding a plug to the node
// This is a placeholder for actual plug-adding logic
}
}