C# Class UnityEngine.TextGenerator

Inheritance: IDisposable
ファイルを表示 Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Public Methods

Method Description
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.

Private Methods

Method Description
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

Method Details

GetCharacters() public method

public GetCharacters ( List characters ) : void
characters List
return void

GetLines() public method

public GetLines ( List lines ) : void
lines List
return void

GetPreferredHeight() public method

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.
return float

GetPreferredWidth() public method

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.
return float

GetVertices() public method

public GetVertices ( List vertices ) : void
vertices List
return void

Invalidate() public method

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

public Invalidate ( ) : void
return void

Populate() public method

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.
return bool

PopulateWithErrors() public method

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.
return bool

TextGenerator() public method

Create a TextGenerator.

public TextGenerator ( ) : System
return System

TextGenerator() public method

Create a TextGenerator.

public TextGenerator ( int initialCapacity ) : System
initialCapacity int
return System