Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Wire

Represents a wire connection between an output port and an input port in a graph.
Read time 1 minuteLast updated 8 days ago

Definition

public sealed class Wire : IEquatable<Wire>

Remarks

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.

Examples

Wire wire = graph.GetWire(outputPort, inputPort);wire.WidthOverride = 4f;wire.Opacity = 0.5f;wire.IsDashed = true;

Properties

Property

Description

GraphThe Wire.Graph that contains the current wire connection.
InputPortThe input port at the end of the connection.
IsDashedWhether the wire is drawn with a dashed pattern.
OpacityThe opacity multiplier applied to the wire.
OutputPortThe output port at the start of the connection.
WidthOverrideThe width override applied to the wire.

Methods

Method

Description

EqualsDetermines whether the current wire is equal to the specified object.
GetHashCodeReturns a hash code that represents the current wire.

Operators

Operator

Description

operator ==Determine whether two wires represent the same connection.
operator !=Determine whether two wires represent different connections.