文档

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

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.TextRenderingModule
public float GetPreferredWidth(string str, TextGenerationSettings settings)

Parameters

Generation text.

Settings for generation.

Returns

Type

Description

floatPreferred width.