文档

Unity Engine

Unity Engine

GetPreferredWidth(string, TextGenerationSettings)

Given a string and settings, returns the preferred width for a container that would hold this text.
阅读时间1 分钟最后更新于 1 天前

Definition

public float GetPreferredWidth(string str, TextGenerationSettings settings)

Parameters

Generation text.

Settings for generation.

Returns

Type

Description

floatPreferred width.