Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetPreferredHeight(string, TextGenerationSettings)

Given a string and settings, returns the preferred height for a container that would hold this text.
Read time 1 minuteLast updated 4 days ago

Definition

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

Parameters

Generation text.

Settings for generation.

Returns

Type

Description

floatPreferred height.