C# Класс UnityEngine.TextGenerator

Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetCharacters ( List characters ) : void
GetLines ( List lines ) : void
GetPreferredHeight ( string str, TextGenerationSettings settings ) : float

Given a string and settings, returns the preferred height for a container that would hold this text.

GetPreferredWidth ( string str, TextGenerationSettings settings ) : float

Given a string and settings, returns the preferred width for a container that would hold this text.

GetVertices ( List vertices ) : void
Invalidate ( ) : void

Mark the text generator as invalid. This will force a full text generation the next time Populate is called.

Populate ( string str, TextGenerationSettings settings ) : bool

Will generate the vertices and other data for the given string with the given settings.

PopulateWithErrors ( string str, TextGenerationSettings settings, GameObject context ) : bool

Will generate the vertices and other data for the given string with the given settings.

TextGenerator ( ) : System

Create a TextGenerator.

TextGenerator ( int initialCapacity ) : System

Create a TextGenerator.

Приватные методы

Метод Описание
Dispose_cpp ( ) : void
GetCharactersArray ( ) : UnityEngine.UICharInfo[]
GetCharactersInternal ( object characters ) : void
GetLinesArray ( ) : UnityEngine.UILineInfo[]
GetLinesInternal ( object lines ) : void
GetVerticesArray ( ) : UnityEngine.UIVertex[]
GetVerticesInternal ( object vertices ) : void
IDisposable ( ) : void
INTERNAL_CALL_Populate_Internal_cpp ( TextGenerator self, string str, Font font, Color &color, int fontSize, float scaleFactor, float lineSpacing, FontStyle style, bool richText, bool resizeTextForBestFit, int resizeTextMinSize, int resizeTextMaxSize, int verticalOverFlow, int horizontalOverflow, bool updateBounds, TextAnchor anchor, float extentsX, float extentsY, float pivotX, float pivotY, bool generateOutOfBounds, bool alignByGeometry, uint &error ) : bool
INTERNAL_get_rectExtents ( Rect &value ) : void
Init ( ) : void
InvalidateAll ( ) : void
PopulateAlways ( string str, TextGenerationSettings settings ) : TextGenerationError
PopulateWithError ( string str, TextGenerationSettings settings ) : TextGenerationError
Populate_Internal ( string str, Font font, Color color, int fontSize, float scaleFactor, float lineSpacing, FontStyle style, bool richText, bool resizeTextForBestFit, int resizeTextMinSize, int resizeTextMaxSize, VerticalWrapMode verticalOverFlow, HorizontalWrapMode horizontalOverflow, bool updateBounds, TextAnchor anchor, Vector2 extents, Vector2 pivot, bool generateOutOfBounds, bool alignByGeometry, TextGenerationError &error ) : bool
Populate_Internal_cpp ( string str, Font font, Color color, int fontSize, float scaleFactor, float lineSpacing, FontStyle style, bool richText, bool resizeTextForBestFit, int resizeTextMinSize, int resizeTextMaxSize, int verticalOverFlow, int horizontalOverflow, bool updateBounds, TextAnchor anchor, float extentsX, float extentsY, float pivotX, float pivotY, bool generateOutOfBounds, bool alignByGeometry, uint &error ) : bool
ValidatedSettings ( TextGenerationSettings settings ) : TextGenerationSettings

Описание методов

GetCharacters() публичный Метод

public GetCharacters ( List characters ) : void
characters List
Результат void

GetLines() публичный Метод

public GetLines ( List lines ) : void
lines List
Результат void

GetPreferredHeight() публичный Метод

Given a string and settings, returns the preferred height for a container that would hold this text.

public GetPreferredHeight ( string str, TextGenerationSettings settings ) : float
str string Generation text.
settings TextGenerationSettings Settings for generation.
Результат float

GetPreferredWidth() публичный Метод

Given a string and settings, returns the preferred width for a container that would hold this text.

public GetPreferredWidth ( string str, TextGenerationSettings settings ) : float
str string Generation text.
settings TextGenerationSettings Settings for generation.
Результат float

GetVertices() публичный Метод

public GetVertices ( List vertices ) : void
vertices List
Результат void

Invalidate() публичный Метод

Mark the text generator as invalid. This will force a full text generation the next time Populate is called.

public Invalidate ( ) : void
Результат void

Populate() публичный Метод

Will generate the vertices and other data for the given string with the given settings.

public Populate ( string str, TextGenerationSettings settings ) : bool
str string String to generate.
settings TextGenerationSettings Settings.
Результат bool

PopulateWithErrors() публичный Метод

Will generate the vertices and other data for the given string with the given settings.

public PopulateWithErrors ( string str, TextGenerationSettings settings, GameObject context ) : bool
str string String to generate.
settings TextGenerationSettings Generation settings.
context GameObject The object used as context of the error log message, if necessary.
Результат bool

TextGenerator() публичный Метод

Create a TextGenerator.

public TextGenerator ( ) : System
Результат System

TextGenerator() публичный Метод

Create a TextGenerator.

public TextGenerator ( int initialCapacity ) : System
initialCapacity int
Результат System