Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


WithDisplayName(string)

Configures the display name of the port being built.
Read time 1 minuteLast updated 11 days ago

Definition

T WithDisplayName(string displayName)

Parameters

displayName

The display name to assign to the port.

Returns

Type

Description

TThe current builder instance for method chaining.

Remarks

Use this method to assign a custom label to the port. This label appears in the user interface next to the port and helps clarify its purpose. Set the display name before calling IPortBuilder<T>.Build(). The value does not affect functionality but improves usability and readability. If not set, the port name passed during creation (see: Node.IPortDefinitionContext.AddInputPort and Node.IPortDefinitionContext.AddOutputPort) is used as the fallback display name.