文档

Unity Engine

Unity Engine

Disconnect(IPort, IPort)

Removes the wire connection between two ports.
阅读时间1 分钟最后更新于 1 个月前

Definition

public bool Disconnect(IPort output, IPort input)

Parameters

output

The output port to disconnect.

input

The input port to disconnect.

Returns

Type

Description

booltrue if a connection (wire or portal) existed and was removed; otherwise false.

Remarks

This method removes direct wires and any Portals that serve only this specific connection. Enclose this method with Graph.UndoBeginRecordGraph and Graph.UndoEndRecordGraph to add this operation to the undo stack and to update the graph view with the changes.