文档

Unity Engine

Unity Engine

WithDisplayName(string)

Configures the display name of the port being built.
阅读时间1 分钟最后更新于 1 个月前

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.