Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

Context.GetPortReference

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

Cancel

Declaration

public PortReference GetPortReference(Hash128 portID);

Parameters

Parameter Description
portID Unique identifier of the target port.

Returns

PortReference A PortReference that references the port with the specified ID in the graph associated with this context.

Description

Retrieves a reference to a port in the graph associated with this context, using the port's unique identifier.

The returned PortReference can be used to set, retrieve, or clear the port preview for that specific port in the graph canvas. Throws ObjectDisposedException when you access this property after you call Context.Dispose on the context. Throws ArgumentException when you provide an invalid .

 context.GetPortReference(portID).SetPreview("42.0");