Kerbal Space Program
1.12.4
|
Base class which contains common properties and functions shared between the TextMeshPro and TextMeshProUGUI component. More...
Public Member Functions | |
virtual void | ClearMesh () |
Function to clear the geometry of the Primary and Sub Text objects. More... | |
virtual void | ClearMesh (bool uploadGeometry) |
Function to clear the geometry of the Primary and Sub Text objects. More... | |
override void | CrossFadeAlpha (float alpha, float duration, bool ignoreTimeScale) |
Tweens the alpha of the CanvasRenderer color associated with this Graphic. More... | |
override void | CrossFadeColor (Color targetColor, float duration, bool ignoreTimeScale, bool useAlpha) |
virtual void | ForceMeshUpdate () |
Function to force the regeneration of the text object. More... | |
virtual void | ForceMeshUpdate (bool ignoreActiveState) |
Method used for resetting vertex layout when switching to and from Volumetric Text mode. More... | |
virtual string | GetParsedText () |
Function which returns the text after it has been parsed and rich text tags removed. More... | |
Vector2 | GetPreferredValues () |
Function to Calculate the Preferred Width and Height of the text object. More... | |
Vector2 | GetPreferredValues (float width, float height) |
Function to Calculate the Preferred Width and Height of the text object given the provided width and height. More... | |
Vector2 | GetPreferredValues (string text) |
Function to Calculate the Preferred Width and Height of the text object given a certain string. More... | |
Vector2 | GetPreferredValues (string text, float width, float height) |
Function to Calculate the Preferred Width and Height of the text object given a certain string and size of text container. More... | |
Vector2 | GetRenderedValues () |
Method returning the rendered width and height of the text object. More... | |
Vector2 | GetRenderedValues (bool onlyVisibleCharacters) |
virtual TMP_TextInfo | GetTextInfo (string text) |
Function used to evaluate the length of a text string. More... | |
void | SetCharArray (char[] sourceText) |
Character array containing the text to be displayed. More... | |
void | SetCharArray (char[] sourceText, int start, int length) |
Character array containing the text to be displayed. More... | |
void | SetCharArray (int[] sourceText, int start, int length) |
Character array containing the text to be displayed. More... | |
void | SetText (string text) |
void | SetText (string text, bool syncTextInputBox) |
void | SetText (string text, float arg0) |
void | SetText (string text, float arg0, float arg1) |
void | SetText (string text, float arg0, float arg1, float arg2) |
void | SetText (StringBuilder text) |
Set the text using a StringBuilder. More... | |
virtual void | SetVertices (Vector3[] vertices) |
Function to push a new set of vertices to the mesh. More... | |
virtual void | UpdateGeometry (Mesh mesh, int index) |
Function to force the regeneration of the text object. More... | |
virtual void | UpdateMeshPadding () |
Function to be used to force recomputing of character padding when Shader / Material properties have been changed via script. More... | |
virtual void | UpdateVertexData (TMP_VertexDataUpdateFlags flags) |
Function to push the updated vertex data into the mesh and renderer. More... | |
virtual void | UpdateVertexData () |
Function to push the updated vertex data into the mesh and renderer. More... | |
Protected Types | |
enum | TextInputSources { TextInputSources.Text = 0, TextInputSources.SetText = 1, TextInputSources.SetCharArray = 2, TextInputSources.String = 3 } |
Protected Member Functions | |
void | AddFloatToCharArray (float number, ref int index, int precision) |
Function used in conjunction with SetText() More... | |
void | AddIntToCharArray (int number, ref int index, int precision) |
// Function used in conjunction with SetText() More... | |
virtual void | AdjustLineOffset (int startIndex, int endIndex, float offset) |
Method to adjust line spacing as a result of using different fonts or font point size. More... | |
virtual Vector2 | CalculatePreferredValues (float defaultFontSize, Vector2 marginSize, bool ignoreTextAutoSizing) |
Method to calculate the preferred width and height of the text object. More... | |
virtual void | ClearSubMeshObjects () |
Destroy Sub Mesh Objects. More... | |
virtual void | ComputeMarginSize () |
Function to force an update of the margin size. More... | |
float | ConvertToFloat (char[] chars, int startIndex, int length) |
Extracts a float value from char[] assuming we know the position of the start, end and decimal point. More... | |
float | ConvertToFloat (char[] chars, int startIndex, int length, out int lastIndex) |
Extracts a float value from char[] given a start index and length. More... | |
virtual Material | CreateMaterialInstance (Material source) |
Method to set the materials of the text and sub text objects. More... | |
virtual void | DrawTextHighlight (Vector3 start, Vector3 end, ref int index, Color32 highlightColor) |
virtual void | DrawUnderlineMesh (Vector3 start, Vector3 end, ref int index, float startScale, float endScale, float maxScale, float sdfScale, Color32 underlineColor) |
Method to add the underline geometry. More... | |
virtual void | FillCharacterVertexBuffers (int i, int index_X4) |
Store vertex attributes into the appropriate TMP_MeshInfo. More... | |
virtual void | FillCharacterVertexBuffers (int i, int index_X4, bool isVolumetric) |
virtual void | FillSpriteVertexBuffers (int i, int index_X4) |
Fill Vertex Buffers for Sprites More... | |
virtual void | GenerateTextMesh () |
Method which parses the text input, does the layout of the text as well as generating the geometry. More... | |
virtual Bounds | GetCompoundBounds () |
Method returning the compound bounds of the text object and child sub objects. More... | |
TMP_FontAsset | GetFontAssetForWeight (int fontWeight) |
virtual Material | GetMaterial (Material mat) |
Function called internally when a new material is assigned via the fontMaterial property. More... | |
virtual Material[] | GetMaterials (Material[] mats) |
Method returning instances of the materials used by the text object. More... | |
virtual float | GetPaddingForMaterial () |
Get the padding value for the currently assigned material More... | |
virtual float | GetPaddingForMaterial (Material mat) |
Get the padding value for the given material More... | |
float | GetPreferredHeight () |
Method to calculate the preferred height of a text object. More... | |
float | GetPreferredHeight (Vector2 margin) |
Method to calculate the preferred height of a text object. More... | |
float | GetPreferredWidth () |
Method to calculate the preferred width of a text object. More... | |
float | GetPreferredWidth (Vector2 margin) |
Method to calculate the preferred width of a text object. More... | |
float | GetRenderedHeight () |
Method returning the rendered height of the text object. More... | |
float | GetRenderedHeight (bool onlyVisibleCharacters) |
Method returning the rendered height of the text object. More... | |
float | GetRenderedWidth () |
Method returning the rendered width of the text object. More... | |
float | GetRenderedWidth (bool onlyVisibleCharacters) |
Method returning the rendered width of the text object. More... | |
virtual Material[] | GetSharedMaterials () |
Method which returns an array containing the materials used by the text object. More... | |
void | GetSpecialCharacters (TMP_FontAsset fontAsset) |
Method used to find and cache references to the Underline and Ellipsis characters. More... | |
Bounds | GetTextBounds () |
Method which returns the bounds of the text object; More... | |
Bounds | GetTextBounds (bool onlyVisibleCharacters) |
Method which returns the bounds of the text object; More... | |
virtual Vector3[] | GetTextContainerLocalCorners () |
Method to return the local corners of the Text Container or RectTransform. More... | |
int | GetUTF16 (string text, int i) |
Convert UTF-16 Hex to Char More... | |
int | GetUTF16 (StringBuilder text, int i) |
Convert UTF-16 Hex to Char More... | |
int | GetUTF32 (string text, int i) |
Convert UTF-32 Hex to Char More... | |
int | GetUTF32 (StringBuilder text, int i) |
Convert UTF-32 Hex to Char More... | |
Color32 | HexCharsToColor (char[] hexChars, int tagCount) |
Method to convert Hex color values to Color32 More... | |
Color32 | HexCharsToColor (char[] hexChars, int startIndex, int length) |
Method to convert Hex Color values to Color32 More... | |
int | HexToInt (char hex) |
Function to pack scale information in the UV2 Channel. More... | |
virtual void | InternalCrossFadeAlpha (float alpha, float duration, bool ignoreTimeScale) |
virtual void | InternalCrossFadeColor (Color targetColor, float duration, bool ignoreTimeScale, bool useAlpha) |
void | LoadDefaultSettings () |
Internal function used to load the default settings of text objects. More... | |
virtual void | LoadFontAsset () |
Method which derived classes need to override to load Font Assets. More... | |
Vector2 | PackUV (float x, float y, float scale) |
Function to pack scale information in the UV2 Channel. More... | |
float | PackUV (float x, float y) |
void | ParseInputText () |
Method to parse the input text based on its source More... | |
void | ReplaceTagWithCharacter (int[] chars, int insertionIndex, int tagLength, char c) |
Replace a given number of characters (tag) in the array with a new character and shift subsequent characters in the array. More... | |
void | ResizeLineExtents (int size) |
Function to increase the size of the Line Extents Array. More... | |
int | RestoreWordWrappingState (ref WordWrapState state) |
Restore the State of various variables used in the mesh creation loop. More... | |
virtual void | SaveGlyphVertexInfo (float padding, float style_padding, Color32 vertexColor) |
Store vertex information for each character. More... | |
virtual void | SaveSpriteVertexInfo (Color32 vertexColor) |
Store vertex information for each sprite. More... | |
void | SaveWordWrappingState (ref WordWrapState state, int index, int count) |
Function used in conjunction with GetTextInfo to figure out Array allocations. More... | |
virtual void | SetActiveSubMeshes (bool state) |
Method to Enable or Disable child SubMesh objects. More... | |
virtual int | SetArraySizes (int[] chars) |
Method used to determine the number of visible characters and required buffer allocations. More... | |
virtual void | SetCulling () |
Set the culling mode on the material. More... | |
virtual void | SetFaceColor (Color32 color) |
Function called internally to set the face color of the material. This will results in an instance of the material. More... | |
virtual void | SetFontBaseMaterial (Material mat) |
Function called internally when assigning a new base material. More... | |
virtual void | SetOutlineColor (Color32 color) |
Function called internally to set the outline color of the material. This will results in an instance of the material. More... | |
virtual void | SetOutlineThickness (float thickness) |
Function called internally to set the outline thickness property of the material. This will results in an instance of the material. More... | |
virtual void | SetShaderDepth () |
Set the Render Queue and ZTest mode on the current material More... | |
virtual void | SetSharedMaterial (Material mat) |
Function called internally when a new shared material is assigned via the fontSharedMaterial property. More... | |
virtual void | SetSharedMaterials (Material[] materials) |
void | SetTextArrayToCharArray (char[] sourceText, ref int[] charBuffer) |
Copies Content of formatted SetText() to charBuffer. More... | |
void | SetTextSortingOrder (VertexSortingOrder order) |
Function to control the sorting of the geometry of the text object. More... | |
void | SetTextSortingOrder (int[] order) |
Function to sort the geometry of the text object in accordance to the provided order. More... | |
void | SetVertexColorGradient (TMP_ColorGradient gradient) |
void | StringBuilderToIntArray (StringBuilder sourceText, ref int[] charBuffer) |
Copy contents of StringBuilder into int array. More... | |
void | StringToCharArray (string sourceText, ref int[] charBuffer) |
Method to store the content of a string into an integer array. More... | |
bool | ValidateHtmlTag (int[] chars, int startIndex, out int endIndex) |
Function to identify and validate the rich tag. Returns the position of the > if the tag was valid. More... | |
Static Protected Attributes | |
static float | k_LargeNegativeFloat = TMP_Math.FLOAT_MIN |
static int | k_LargeNegativeInt = TMP_Math.INT_MIN |
static Vector2 | k_LargeNegativeVector2 = new Vector2(TMP_Math.INT_MIN, TMP_Math.INT_MIN) |
static float | k_LargePositiveFloat = TMP_Math.FLOAT_MAX |
static int | k_LargePositiveInt = TMP_Math.INT_MAX |
static Vector2 | k_LargePositiveVector2 = new Vector2(TMP_Math.INT_MAX, TMP_Math.INT_MAX) |
static Color32 | s_colorWhite = new Color32(255, 255, 255, 255) |
Properties | |
TextAlignmentOptions | alignment [get, set] |
Text alignment options More... | |
float | alpha [get, set] |
Sets the vertex color alpha value. More... | |
virtual bool | autoSizeTextContainer [get, set] |
Enables control over setting the size of the text container to match the text object. More... | |
Bounds | bounds [get] |
Returns the bounds of the mesh of the text object in world space. More... | |
float | characterSpacing [get, set] |
Use the extents of the text geometry for alignment instead of font metrics. More... | |
float | characterWidthAdjustment [get, set] |
Percentage the width of characters can be adjusted before text auto-sizing begins to reduce the point size. More... | |
override Color | color [get, set] |
This is the default vertex color assigned to each vertices. Color tags will override vertex colors unless the overrideColorTags is set. More... | |
VertexGradient | colorGradient [get, set] |
Sets the vertex colors for each of the 4 vertices of the character quads. More... | |
TMP_ColorGradient | colorGradientPreset [get, set] |
Set the vertex colors of the 4 vertices of each character quads. More... | |
bool | enableAutoSizing [get, set] |
Enable text auto-sizing More... | |
bool | enableCulling [get, set] |
Sets the culling on the shaders. Note changing this value will result in an instance of the material. More... | |
bool | enableKerning [get, set] |
Determines if kerning is enabled or disabled. More... | |
bool | enableVertexGradient [get, set] |
Determines if Vertex Color Gradient should be used More... | |
bool | enableWordWrapping [get, set] |
Controls whether or not word wrapping is applied. When disabled, the text will be displayed on a single line. More... | |
bool | extraPadding [get, set] |
Adds extra padding around each character. This may be necessary when the displayed text is very small to prevent clipping. More... | |
Color32 | faceColor [get, set] |
Sets the color of the _FaceColor property of the assigned material. Changing face color will result in an instance of the material. More... | |
int | firstOverflowCharacterIndex [get] |
The first character which exceeds the vertical bounds of its text container. More... | |
int | firstVisibleCharacter [get, set] |
The first character which should be made visible in conjunction with the Text Overflow Linked mode. More... | |
float | flexibleHeight [get] |
float | flexibleWidth [get] |
TMP_FontAsset | font [get, set] |
The Font Asset to be assigned to this text object. More... | |
Material | fontMaterial [get, set] |
The material to be assigned to this text object. An instance of the material will be assigned to the object's renderer. More... | |
virtual Material[] | fontMaterials [get, set] |
The materials to be assigned to this text object. An instance of the materials will be assigned. More... | |
float | fontScale [get] |
The scale of the current text. More... | |
virtual Material | fontSharedMaterial [get, set] |
The material to be assigned to this text object. More... | |
virtual Material[] | fontSharedMaterials [get, set] |
An array containing the materials used by the text object. More... | |
float | fontSize [get, set] |
The point size of the font. More... | |
float | fontSizeMax [get, set] |
Maximum point size of the font when text auto-sizing is enabled. More... | |
float | fontSizeMin [get, set] |
Minimum point size of the font when text auto-sizing is enabled. More... | |
FontStyles | fontStyle [get, set] |
The style of the text More... | |
int | fontWeight [get, set] |
Control the weight of the font if an alternative font asset is assigned for the given weight in the font asset editor. More... | |
VertexSortingOrder | geometrySortingOrder [get, set] |
Determines the sorting order of the geometry of the text object. More... | |
bool | havePropertiesChanged [get, set] |
Property tracking if any of the text properties have changed. Flag is set before the text is regenerated. More... | |
TextureMappingOptions | horizontalMapping [get, set] |
Controls how the face and outline textures will be applied to the text object. More... | |
bool | ignoreRectMaskCulling [get, set] |
Controls whether or not the text object will be culled when using a 2D Rect Mask. More... | |
bool | ignoreVisibility [get, set] |
Forces objects that are not visible to get refreshed. More... | |
bool | isLinkedTextComponent [get, set] |
Indicates whether this text component is linked to another. More... | |
bool | isOrthographic [get, set] |
Sets Perspective Correction to Zero for Orthographic Camera mode & 0.875f for Perspective Camera mode. More... | |
bool | isOverlay [get, set] |
Sets the RenderQueue along with Ztest to force the text to be drawn last and on top of scene elements. More... | |
bool | isRightToLeftText [get, set] |
bool | isTextOverflowing [get] |
Indicates if the text exceeds the vertical bounds of its text container. More... | |
bool | isTextTruncated [get] |
Property indicating whether the text is Truncated or using Ellipsis. More... | |
bool | isUsingBold [get] |
Property used in conjunction with padding calculation for the geometry. More... | |
bool | isUsingLegacyAnimationComponent [get, set] |
Property to handle legacy animation component. More... | |
bool | isVolumetricText [get, set] |
Determines if the geometry of the characters will be quads or volumetric (cubes). More... | |
LayoutElement | layoutElement [get] |
int | layoutPriority [get] |
float | lineSpacing [get, set] |
The amount of additional spacing to add between each lines of text. More... | |
float | lineSpacingAdjustment [get, set] |
The amount of potential line spacing adjustment before text auto sizing kicks in. More... | |
TMP_Text | linkedTextComponent [get, set] |
The linked text component used for flowing the text from one text component to another. More... | |
float | mappingUvLineOffset [get, set] |
Controls the UV Offset for the various texture mapping mode on the text object. More... | |
virtual Vector4 | margin [get, set] |
The margins of the text object. More... | |
float | maxHeight [get] |
int | maxVisibleCharacters [get, set] |
Allows to control how many characters are visible from the input. More... | |
int | maxVisibleLines [get, set] |
Allows control over how many lines of text are displayed. More... | |
int | maxVisibleWords [get, set] |
Allows to control how many words are visible from the input. More... | |
float | maxWidth [get] |
virtual Mesh | mesh [get] |
The mesh used by the font asset and material assigned to the text object. More... | |
float | minHeight [get] |
float | minWidth [get] |
Color32 | outlineColor [get, set] |
Sets the color of the _OutlineColor property of the assigned material. Changing outline color will result in an instance of the material. More... | |
float | outlineWidth [get, set] |
Sets the thickness of the outline of the font. Setting this value will result in an instance of the material. More... | |
TextOverflowModes | overflowMode [get, set] |
bool | overrideColorTags [get, set] |
This overrides the color tags forcing the vertex colors to be the default font color. More... | |
int | pageToDisplay [get, set] |
Controls which page of text is shown More... | |
float | paragraphSpacing [get, set] |
The amount of additional spacing to add between each lines of text. More... | |
bool | parseCtrlCharacters [get, set] |
Enables or Disables parsing of CTRL characters in input text. More... | |
float | pixelsPerUnit [get] |
virtual float | preferredHeight [get] |
Computed preferred height of the text object. More... | |
virtual float | preferredWidth [get] |
Computed preferred width of the text object. More... | |
new RectTransform | rectTransform [get] |
Returns are reference to the RectTransform More... | |
virtual float | renderedHeight [get] |
Compute the rendered height of the text object. More... | |
virtual float | renderedWidth [get] |
Compute the rendered width of the text object. More... | |
TextRenderFlags | renderMode [get, set] |
Determines if the Mesh will be rendered. More... | |
bool | richText [get, set] |
Enables or Disables Rich Text Tags More... | |
TMP_SpriteAnimator | spriteAnimator [get] |
Component used to control wrapping of text following some arbitrary shape. More... | |
TMP_SpriteAsset | spriteAsset [get, set] |
Default Sprite Asset used by the text object. More... | |
string | text [get, set] |
A string containing the text to be displayed. More... | |
Bounds | textBounds [get] |
Returns the bounds of the text of the text object. More... | |
TMP_TextInfo | textInfo [get] |
Returns data about the text object which includes information about each character, word, line, link, etc. More... | |
bool | tintAllSprites [get, set] |
Determines whether or not the sprite color is multiplies by the vertex color of the text. More... | |
new Transform | transform [get] |
Returns are reference to the Transform More... | |
bool | useMaxVisibleDescender [get, set] |
Determines if the text's vertical alignment will be adjusted based on visible descender of the text. More... | |
TextureMappingOptions | verticalMapping [get, set] |
Controls how the face and outline textures will be applied to the text object. More... | |
float | wordSpacing [get, set] |
The amount of additional spacing between words. More... | |
float | wordWrappingRatios [get, set] |
Controls the blending between using character and word spacing to fill-in the space for justified text. More... | |
Base class which contains common properties and functions shared between the TextMeshPro and TextMeshProUGUI component.
|
protected |
|
inlineprotected |
Function used in conjunction with SetText()
number | |
index | |
precision |
|
inlineprotected |
// Function used in conjunction with SetText()
number | |
index | |
precision |
|
inlineprotectedvirtual |
Method to adjust line spacing as a result of using different fonts or font point size.
startIndex | |
endIndex | |
offset |
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotectedvirtual |
Method to calculate the preferred width and height of the text object.
|
inlinevirtual |
Function to clear the geometry of the Primary and Sub Text objects.
Reimplemented in TMPro.TextMeshProUGUI.
|
inlinevirtual |
Function to clear the geometry of the Primary and Sub Text objects.
Reimplemented in TMPro.TextMeshPro.
|
inlineprotectedvirtual |
Destroy Sub Mesh Objects.
Reimplemented in TMPro.TextMeshPro.
|
inlineprotectedvirtual |
Function to force an update of the margin size.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotected |
Extracts a float value from char[] assuming we know the position of the start, end and decimal point.
chars | |
startIndex | |
length |
|
inlineprotected |
Extracts a float value from char[] given a start index and length.
chars |
The Char[] containing the numerical sequence.
startIndex |
The index of the start of the numerical sequence.
length |
The length of the numerical sequence.
lastIndex |
Index of the last character in the validated sequence.
|
inlineprotectedvirtual |
Method to set the materials of the text and sub text objects.
mats |
Function used to create an instance of the material
source |
|
inline |
Tweens the alpha of the CanvasRenderer color associated with this Graphic.
alpha | Target alpha. |
duration | Duration of the tween in seconds. |
ignoreTimeScale | Should ignore Time.scale? |
|
inline |
Tweens the CanvasRenderer color associated with this Graphic.
targetColor | Target color. |
duration | Tween duration. |
ignoreTimeScale | Should ignore Time.scale? |
useAlpha | Should also Tween the alpha channel? |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
Method to add the underline geometry.
start | |
end | |
startScale | |
endScale | |
maxScale | |
underlineColor |
|
inlineprotectedvirtual |
Store vertex attributes into the appropriate TMP_MeshInfo.
i | |
index_X4 |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
Fill Vertex Buffers for Sprites
i | |
spriteIndex_X4 |
|
inlinevirtual |
Function to force the regeneration of the text object.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlinevirtual |
Method used for resetting vertex layout when switching to and from Volumetric Text mode.
updateMesh |
Function to force the regeneration of the text object.
ignoreActiveState | If set to true, the text object will be regenerated regardless of is active state. |
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotectedvirtual |
Method which parses the text input, does the layout of the text as well as generating the geometry.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotectedvirtual |
Method returning the compound bounds of the text object and child sub objects.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotected |
|
inlineprotectedvirtual |
Function called internally when a new material is assigned via the fontMaterial property.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotectedvirtual |
Method returning instances of the materials used by the text object.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotectedvirtual |
Get the padding value for the currently assigned material
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotectedvirtual |
Get the padding value for the given material
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlinevirtual |
Function which returns the text after it has been parsed and rich text tags removed.
|
inlineprotected |
Method to calculate the preferred height of a text object.
|
inlineprotected |
Method to calculate the preferred height of a text object.
margin |
|
inline |
Function to Calculate the Preferred Width and Height of the text object.
|
inline |
Function to Calculate the Preferred Width and Height of the text object given the provided width and height.
|
inline |
Function to Calculate the Preferred Width and Height of the text object given a certain string.
text |
|
inline |
Function to Calculate the Preferred Width and Height of the text object given a certain string and size of text container.
text |
|
inlineprotected |
Method to calculate the preferred width of a text object.
|
inlineprotected |
Method to calculate the preferred width of a text object.
margin |
|
inlineprotected |
Method returning the rendered height of the text object.
|
inlineprotected |
Method returning the rendered height of the text object.
|
inline |
Method returning the rendered width and height of the text object.
|
inline |
onlyVisibleCharacters | Should returned value only factor in visible characters and exclude those greater than maxVisibleCharacters for instance. |
|
inlineprotected |
Method returning the rendered width of the text object.
|
inlineprotected |
Method returning the rendered width of the text object.
|
inlineprotectedvirtual |
Method which returns an array containing the materials used by the text object.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotected |
Method used to find and cache references to the Underline and Ellipsis characters.
|
inlineprotected |
Method which returns the bounds of the text object;
|
inlineprotected |
Method which returns the bounds of the text object;
onlyVisibleCharacters |
|
inlineprotectedvirtual |
Method to return the local corners of the Text Container or RectTransform.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlinevirtual |
Function used to evaluate the length of a text string.
text |
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotected |
Convert UTF-16 Hex to Char
i | The index. |
|
inlineprotected |
Convert UTF-16 Hex to Char
i | The index. |
|
inlineprotected |
Convert UTF-32 Hex to Char
i | The index. |
|
inlineprotected |
Convert UTF-32 Hex to Char
i | The index. |
|
inlineprotected |
Method to convert Hex color values to Color32
hexChars | |
tagCount |
|
inlineprotected |
Method to convert Hex Color values to Color32
hexChars | |
startIndex | |
length |
|
inlineprotected |
Function to pack scale information in the UV2 Channel.
x | |
y | |
scale |
x | |
y |
Method to convert Hex to Int
hex |
|
inlineprotectedvirtual |
alpha | |
duration | |
ignoreTimeScale |
Reimplemented in TMPro.TextMeshProUGUI.
|
inlineprotectedvirtual |
targetColor | |
duration | |
ignoreTimeScale | |
useAlpha | |
useRGB |
Reimplemented in TMPro.TextMeshProUGUI.
|
inlineprotected |
Internal function used to load the default settings of text objects.
|
inlineprotectedvirtual |
Method which derived classes need to override to load Font Assets.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotected |
Function to pack scale information in the UV2 Channel.
x | |
y | |
scale |
Function to pack scale information in the UV2 Channel.
x | |
y | |
scale |
|
inlineprotected |
x | |
y |
|
inlineprotected |
Method to parse the input text based on its source
|
inlineprotected |
Replace a given number of characters (tag) in the array with a new character and shift subsequent characters in the array.
chars | Array which contains the text. |
insertionIndex | The index of where the new character will be inserted |
tagLength | Length of the tag being replaced. |
c | The replacement character. |
|
inlineprotected |
Function to increase the size of the Line Extents Array.
size |
|
inlineprotected |
Restore the State of various variables used in the mesh creation loop.
state |
|
inlineprotectedvirtual |
Store vertex information for each character.
style_padding | Style_padding. |
vertexColor | Vertex color. |
|
inlineprotectedvirtual |
Store vertex information for each sprite.
padding | |
style_padding | |
vertexColor |
|
inlineprotected |
Function used in conjunction with GetTextInfo to figure out Array allocations.
chars |
Save the State of various variables used in the mesh creation loop in conjunction with Word Wrapping
state | |
index | |
count |
|
inlineprotectedvirtual |
Method to Enable or Disable child SubMesh objects.
state |
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotectedvirtual |
Method used to determine the number of visible characters and required buffer allocations.
chars |
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inline |
Character array containing the text to be displayed.
sourceText |
|
inline |
Character array containing the text to be displayed.
sourceText |
|
inline |
Character array containing the text to be displayed.
sourceText |
|
inlineprotectedvirtual |
Set the culling mode on the material.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotectedvirtual |
Function called internally to set the face color of the material. This will results in an instance of the material.
color |
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotectedvirtual |
Function called internally when assigning a new base material.
mat |
|
inlineprotectedvirtual |
Function called internally to set the outline color of the material. This will results in an instance of the material.
color |
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotectedvirtual |
Function called internally to set the outline thickness property of the material. This will results in an instance of the material.
thickness |
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotectedvirtual |
Set the Render Queue and ZTest mode on the current material
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotectedvirtual |
Function called internally when a new shared material is assigned via the fontSharedMaterial property.
mat |
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotectedvirtual |
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inline |
text |
|
inline |
text |
|
inline |
Formatted string containing a pattern and a value representing the text to be rendered.
ex. TextMeshPro.SetText ("Number is {0:1}.", 5.56f);
T |
text | String containing the pattern."</param> <param name="arg0">Value is a float. |
|
inline |
Formatted string containing a pattern and a value representing the text to be rendered.
ex. TextMeshPro.SetText ("First number is {0} and second is {1:2}.", 10, 5.756f);
T |
text | String containing the pattern."</param> <param name="arg0">Value is a float.</param> <param name="arg1">Value is a float. |
|
inline |
Formatted string containing a pattern and a value representing the text to be rendered.
ex. TextMeshPro.SetText ("A = {0}, B = {1} and C = {2}.", 2, 5, 7);
T |
text | String containing the pattern."</param> <param name="arg0">Value is a float.</param> <param name="arg1">Value is a float.</param> <param name="arg2">Value is a float. |
|
inline |
Set the text using a StringBuilder.
Using a StringBuilder instead of concatenating strings prevents memory pollution with temporary objects.
text | StringBuilder with text to display. |
|
inlineprotected |
Copies Content of formatted SetText() to charBuffer.
sourceText | |
charBuffer |
|
inlineprotected |
Function to control the sorting of the geometry of the text object.
|
inlineprotected |
Function to sort the geometry of the text object in accordance to the provided order.
order |
|
inlineprotected |
|
inlinevirtual |
Function to push a new set of vertices to the mesh.
vertices |
|
inlineprotected |
Copy contents of StringBuilder into int array.
sourceText | Text to copy. |
charBuffer | Array to store contents. |
|
inlineprotected |
Method to store the content of a string into an integer array.
sourceText | |
charBuffer |
|
inlinevirtual |
Function to force the regeneration of the text object.
flags | Flags to control which portions of the geometry gets uploaded. |
Function to update the geometry of the main and sub text objects.
mesh | |
index |
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlinevirtual |
Function to be used to force recomputing of character padding when Shader / Material properties have been changed via script.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlinevirtual |
Function to push the updated vertex data into the mesh and renderer.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlinevirtual |
Function to push the updated vertex data into the mesh and renderer.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
|
inlineprotected |
Function to identify and validate the rich tag. Returns the position of the > if the tag was valid.
chars | |
startIndex | |
endIndex |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
getset |
Text alignment options
|
getset |
Sets the vertex color alpha value.
|
getset |
Enables control over setting the size of the text container to match the text object.
|
get |
Returns the bounds of the mesh of the text object in world space.
|
getset |
Use the extents of the text geometry for alignment instead of font metrics.
The amount of additional spacing between characters.
|
getset |
Percentage the width of characters can be adjusted before text auto-sizing begins to reduce the point size.
|
getset |
This is the default vertex color assigned to each vertices. Color tags will override vertex colors unless the overrideColorTags is set.
|
getset |
Sets the vertex colors for each of the 4 vertices of the character quads.
The color gradient.
|
getset |
Set the vertex colors of the 4 vertices of each character quads.
|
getset |
Enable text auto-sizing
|
getset |
Sets the culling on the shaders. Note changing this value will result in an instance of the material.
|
getset |
Determines if kerning is enabled or disabled.
|
getset |
Determines if Vertex Color Gradient should be used
true
if enable vertex gradient; otherwise, false
.
|
getset |
Controls whether or not word wrapping is applied. When disabled, the text will be displayed on a single line.
|
getset |
Adds extra padding around each character. This may be necessary when the displayed text is very small to prevent clipping.
|
getset |
Sets the color of the _FaceColor property of the assigned material. Changing face color will result in an instance of the material.
|
get |
The first character which exceeds the vertical bounds of its text container.
|
getset |
The first character which should be made visible in conjunction with the Text Overflow Linked mode.
|
get |
|
get |
|
getset |
The Font Asset to be assigned to this text object.
|
getset |
The material to be assigned to this text object. An instance of the material will be assigned to the object's renderer.
|
getset |
The materials to be assigned to this text object. An instance of the materials will be assigned.
|
get |
The scale of the current text.
|
getset |
The material to be assigned to this text object.
|
getset |
An array containing the materials used by the text object.
|
getset |
The point size of the font.
|
getset |
Maximum point size of the font when text auto-sizing is enabled.
|
getset |
Minimum point size of the font when text auto-sizing is enabled.
|
getset |
The style of the text
|
getset |
Control the weight of the font if an alternative font asset is assigned for the given weight in the font asset editor.
|
getset |
Determines the sorting order of the geometry of the text object.
|
getset |
Property tracking if any of the text properties have changed. Flag is set before the text is regenerated.
|
getset |
Controls how the face and outline textures will be applied to the text object.
|
getset |
Controls whether or not the text object will be culled when using a 2D Rect Mask.
|
getset |
Forces objects that are not visible to get refreshed.
|
getset |
Indicates whether this text component is linked to another.
|
getset |
Sets Perspective Correction to Zero for Orthographic Camera mode & 0.875f for Perspective Camera mode.
|
getset |
Sets the RenderQueue along with Ztest to force the text to be drawn last and on top of scene elements.
|
getset |
|
get |
Indicates if the text exceeds the vertical bounds of its text container.
|
get |
Property indicating whether the text is Truncated or using Ellipsis.
|
get |
Property used in conjunction with padding calculation for the geometry.
|
getset |
Property to handle legacy animation component.
|
getset |
Determines if the geometry of the characters will be quads or volumetric (cubes).
|
getprotected |
|
get |
|
getset |
The amount of additional spacing to add between each lines of text.
|
getset |
The amount of potential line spacing adjustment before text auto sizing kicks in.
|
getset |
The linked text component used for flowing the text from one text component to another.
|
getset |
Controls the UV Offset for the various texture mapping mode on the text object.
Controls the horizontal offset of the UV of the texture mapping mode for each line of the text object.
|
getset |
The margins of the text object.
|
get |
|
getset |
Allows to control how many characters are visible from the input.
|
getset |
Allows control over how many lines of text are displayed.
|
getset |
Allows to control how many words are visible from the input.
|
get |
|
get |
The mesh used by the font asset and material assigned to the text object.
|
get |
|
get |
|
getset |
Sets the color of the _OutlineColor property of the assigned material. Changing outline color will result in an instance of the material.
|
getset |
Sets the thickness of the outline of the font. Setting this value will result in an instance of the material.
|
getset |
Controls the Text Overflow Mode
|
getset |
This overrides the color tags forcing the vertex colors to be the default font color.
|
getset |
Controls which page of text is shown
|
getset |
The amount of additional spacing to add between each lines of text.
|
getset |
Enables or Disables parsing of CTRL characters in input text.
|
get |
|
get |
Computed preferred height of the text object.
|
get |
Computed preferred width of the text object.
|
get |
Returns are reference to the RectTransform
|
get |
Compute the rendered height of the text object.
|
get |
Compute the rendered width of the text object.
|
getset |
Determines if the Mesh will be rendered.
|
getset |
Enables or Disables Rich Text Tags
|
getprotected |
Component used to control wrapping of text following some arbitrary shape.
Component used to control and animate sprites in the text object.
|
getset |
Default Sprite Asset used by the text object.
|
getset |
A string containing the text to be displayed.
|
get |
Returns the bounds of the text of the text object.
|
get |
Returns data about the text object which includes information about each character, word, line, link, etc.
|
getset |
Determines whether or not the sprite color is multiplies by the vertex color of the text.
|
get |
Returns are reference to the Transform
|
getset |
Determines if the text's vertical alignment will be adjusted based on visible descender of the text.
|
getset |
Controls how the face and outline textures will be applied to the text object.
|
getset |
The amount of additional spacing between words.
|
getset |
Controls the blending between using character and word spacing to fill-in the space for justified text.