Wire
class in
Unity.GraphToolkit.Editor
Suggest a change
Success!
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Close
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Close
Description
Represents a wire connection between an output port and an input port in a graph.
A Wire corresponds to the connection between two ports, including connections that pass through
wire portals. Use Graph.GetWire to obtain a Wire for a connected port pair.
Additional resources: Graph.GetWire, IPort
Retrieve a wire between two connected ports and customize its visual properties on the graph canvas.
Wire wire = graph.GetWire(outputPort, inputPort);
wire.WidthOverride = 4f;
wire.Opacity = 0.5f;
wire.IsDashed = true;
Properties
| Property |
Description |
| Graph |
The Wire.Graph that contains the current wire connection.
|
| InputPort |
The input port at the end of the connection.
|
| IsDashed |
Whether the wire is drawn with a dashed pattern.
|
| Opacity |
The opacity multiplier applied to the wire.
|
| OutputPort |
The output port at the start of the connection.
|
| WidthOverride |
The width override applied to the wire.
|
Public Methods
| Method |
Description |
| Equals |
Determines whether the current wire represents the same connection as another wire.
|
| GetHashCode |
Returns a hash code that represents the current wire.
|
Operators
| Operator |
Description |
| operator != |
Determine whether two wires represent different connections.
|
| operator == |
Determine whether two wires represent the same connection.
|