struct in Unity.GraphToolkit.Editor.GraphVisualization
Identifies a wire inside a visualization WireReference.Context so visualization changes can be applied to it.
Obtain a WireReference from Context.GetWireReference, providing the unique identifiers of the output and input ports that define the connection.
The reference is only meaningful for the WireReference.Context that produced it.
You can use its properties to set, retrieve, or clear customization for that specific wire in the graph canvas.
Two WireReference values are equal when they share the same WireReference.OutputPortID and WireReference.InputPortID, and refer to the same WireReference.Context instance.
Additional resources: WireReference.Context, Context.GetWireReference
Create a visualization context for a graph, retrieve a <see cref="Unity.GraphToolkit.Editor.GraphVisualization.WireReference" /> for a connected pair of ports, apply customizations, then clear them.
using Context context = Registry.CreateVisualizationContext(graph.UID); WireReference wire = context.GetWireReference(outputPortID, inputPortID); wire.IsDashed = true; wire.WidthOverride = 4f; wire.Opacity = 0.5f; wire.ClearCustomization();
| Property | Description |
|---|---|
| Context | Visualization context that produced the current wire reference. |
| InputPortID | Unique identifier of the input port at the end of the connection. |
| IsDashed | Whether the reference wire is drawn with a dashed pattern. |
| Opacity | The opacity multiplier applied to the referenced wire. |
| OutputPortID | Unique identifier of the output port at the start of the connection. |
| WidthOverride | The width override applied to the referenced wire. |
| Method | Description |
|---|---|
| ClearCustomization | Clears all customization previously applied to the referenced wire. |
| Equals | Indicates whether the current WireReference is equal to another WireReference. |
| GetHashCode | Returns a hash code for the current WireReference. |
| Operator | Description |
|---|---|
| operator != | Compares two WireReference values for inequality. |
| operator == | Compares two WireReference values for equality. |