IPortBuilder<T>
Base interface representing a generic port builder. Used in a builder pattern to configure and construct ports.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Interface
- Namespace: Unity.GraphToolkit.Editor
- Assembly: UnityEditor
public interface IPortBuilder<T>
Remarks
This interface supports a builder pattern, where each method returns the builder instance, allowing chained configuration of port settings before final construction using IPortBuilder<T>.Build(). Use derived interfaces such as IInputPortBuilder or IOutputPortBuilder to build specific port types.
Examples
context.AddInputPort("MyInput") .WithDataType(typeof(int)) .WithDisplayName("Input Value") .Build();
Methods
Method | Description |
|---|---|
| AsVertical | Configures the port to be built as a vertical port. |
| Build | Builds and returns the final IPort instance based on the current configuration of the builder. |
| WithCapacity | Configures the connection capacity of the port being built. |
| WithConnectorUI | Configures the connector UI shape for the port being built. |
| WithDisplayName | Configures the display name of the port being built. |
| WithTooltip | Configures the tooltip text of the port being built. |