Hue Preserving Color Blending
|
Base class which contains common properties and functions shared between the TextMeshPro and TextMeshProUGUI component. More...
Public Member Functions | |
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 void | UpdateGeometry (Mesh mesh, int index) |
Function to force the regeneration of the text object. 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... | |
virtual void | SetVertices (Vector3[] vertices) |
Function to push a new set of vertices to the mesh. More... | |
virtual void | UpdateMeshPadding () |
Function to be used to force recomputing of character padding when Shader / Material properties have been changed via script. More... | |
override void | CrossFadeColor (Color targetColor, float duration, bool ignoreTimeScale, bool useAlpha) |
override void | CrossFadeAlpha (float alpha, float duration, bool ignoreTimeScale) |
Tweens the alpha of the CanvasRenderer color associated with this Graphic. 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... | |
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... | |
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... | |
virtual void | ComputeMarginSize () |
Function to force an update of the margin size. More... | |
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... | |
virtual string | GetParsedText () |
Function which returns the text after it has been parsed and rich text tags removed. More... | |
Protected Types | |
enum | TextInputSources { Text = 0, SetText = 1, SetCharArray = 2, String = 3 } |
Protected Member Functions | |
virtual void | LoadFontAsset () |
Method which derived classes need to override to load Font Assets. More... | |
virtual void | SetSharedMaterial (Material mat) |
Function called internally when a new shared material is assigned via the fontSharedMaterial property. More... | |
virtual Material | GetMaterial (Material mat) |
Function called internally when a new material is assigned via the fontMaterial property. More... | |
virtual void | SetFontBaseMaterial (Material mat) |
Function called internally when assigning a new base material. More... | |
virtual Material [] | GetSharedMaterials () |
Method which returns an array containing the materials used by the text object. More... | |
virtual void | SetSharedMaterials (Material[] materials) |
virtual Material [] | GetMaterials (Material[] mats) |
Method returning instances of the materials used by the text object. More... | |
virtual Material | CreateMaterialInstance (Material source) |
Method to set the materials of the text and sub text objects. More... | |
void | SetVertexColorGradient (TMP_ColorGradient gradient) |
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... | |
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 | 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 | SetCulling () |
Set the culling mode on the material. 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... | |
virtual Vector3 [] | GetTextContainerLocalCorners () |
Method to return the local corners of the Text Container or RectTransform. More... | |
virtual void | InternalCrossFadeColor (Color targetColor, float duration, bool ignoreTimeScale, bool useAlpha) |
virtual void | InternalCrossFadeAlpha (float alpha, float duration, bool ignoreTimeScale) |
void | ParseInputText () |
Method to parse the input text based on its source More... | |
void | SetTextArrayToCharArray (char[] sourceText, ref int[] charBuffer) |
Copies Content of formatted SetText() to charBuffer. More... | |
void | StringToCharArray (string sourceText, ref int[] charBuffer) |
Method to store the content of a string into an integer array. More... | |
void | StringBuilderToIntArray (StringBuilder sourceText, ref int[] charBuffer) |
Copy contents of StringBuilder into int array. More... | |
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 int | SetArraySizes (int[] chars) |
Method used to determine the number of visible characters and required buffer allocations. More... | |
virtual void | GenerateTextMesh () |
Method which parses the text input, does the layout of the text as well as generating the geometry. 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 | 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 | 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... | |
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... | |
virtual Vector2 | CalculatePreferredValues (float defaultFontSize, Vector2 marginSize, bool ignoreTextAutoSizing) |
Method to calculate the preferred width and height of the text object. More... | |
virtual Bounds | GetCompoundBounds () |
Method returning the compound bounds of the text object and child sub objects. 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 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... | |
void | ResizeLineExtents (int size) |
Function to increase the size of the Line Extents Array. More... | |
void | SaveWordWrappingState (ref WordWrapState state, int index, int count) |
Function used in conjunction with GetTextInfo to figure out Array allocations. 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... | |
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 | 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 | DrawTextHighlight (Vector3 start, Vector3 end, ref int index, Color32 highlightColor) |
void | LoadDefaultSettings () |
Internal function used to load the default settings of text objects. More... | |
void | GetSpecialCharacters (TMP_FontAsset fontAsset) |
Method used to find and cache references to the Underline and Ellipsis characters. 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... | |
TMP_FontAsset | GetFontAssetForWeight (int fontWeight) |
virtual void | SetActiveSubMeshes (bool state) |
Method to Enable or Disable child SubMesh objects. More... | |
virtual void | ClearSubMeshObjects () |
Destroy Sub Mesh Objects. 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) |
int | HexToInt (char hex) |
Function to pack scale information in the UV2 Channel. 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... | |
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... | |
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... | |
Protected Attributes | |
string | m_text |
bool | m_isRightToLeft = false |
TMP_FontAsset | m_fontAsset |
TMP_FontAsset | m_currentFontAsset |
bool | m_isSDFShader |
Material | m_sharedMaterial |
Material | m_currentMaterial |
MaterialReference [] | m_materialReferences = new MaterialReference[32] |
Dictionary< int, int > | m_materialReferenceIndexLookup = new Dictionary<int, int>() |
TMP_XmlTagStack< MaterialReference > | m_materialReferenceStack = new TMP_XmlTagStack<MaterialReference>(new MaterialReference[16]) |
int | m_currentMaterialIndex |
Material [] | m_fontSharedMaterials |
Material | m_fontMaterial |
Material [] | m_fontMaterials |
bool | m_isMaterialDirty |
Color32 | m_fontColor32 = Color.white |
Color | m_fontColor = Color.white |
Color32 | m_underlineColor = s_colorWhite |
Color32 | m_strikethroughColor = s_colorWhite |
Color32 | m_highlightColor = s_colorWhite |
bool | m_enableVertexGradient |
ColorMode | m_colorMode = ColorMode.FourCornersGradient |
VertexGradient | m_fontColorGradient = new VertexGradient(Color.white) |
TMP_ColorGradient | m_fontColorGradientPreset |
TMP_SpriteAsset | m_spriteAsset |
bool | m_tintAllSprites |
bool | m_tintSprite |
Color32 | m_spriteColor |
bool | m_overrideHtmlColors = false |
Color32 | m_faceColor = Color.white |
Color32 | m_outlineColor = Color.black |
float | m_outlineWidth = 0.0f |
float | m_fontSize = 36 |
float | m_currentFontSize |
float | m_fontSizeBase = 36 |
TMP_XmlTagStack< float > | m_sizeStack = new TMP_XmlTagStack<float>(new float[16]) |
int | m_fontWeight = 400 |
int | m_fontWeightInternal |
TMP_XmlTagStack< int > | m_fontWeightStack = new TMP_XmlTagStack<int>(new int[16]) |
bool | m_enableAutoSizing |
float | m_maxFontSize |
float | m_minFontSize |
float | m_fontSizeMin = 0 |
float | m_fontSizeMax = 0 |
FontStyles | m_fontStyle = FontStyles.Normal |
FontStyles | m_style = FontStyles.Normal |
TMP_BasicXmlTagStack | m_fontStyleStack |
bool | m_isUsingBold = false |
TextAlignmentOptions | m_textAlignment = TextAlignmentOptions.TopLeft |
TextAlignmentOptions | m_lineJustification |
TMP_XmlTagStack< TextAlignmentOptions > | m_lineJustificationStack = new TMP_XmlTagStack<TextAlignmentOptions>(new TextAlignmentOptions[16]) |
Vector3 [] | m_textContainerLocalCorners = new Vector3[4] |
bool | m_isAlignmentEnumConverted |
float | m_characterSpacing = 0 |
float | m_cSpacing = 0 |
float | m_monoSpacing = 0 |
float | m_wordSpacing = 0 |
float | m_lineSpacing = 0 |
float | m_lineSpacingDelta = 0 |
float | m_lineHeight = TMP_Math.FLOAT_UNSET |
float | m_lineSpacingMax = 0 |
float | m_paragraphSpacing = 0 |
float | m_charWidthMaxAdj = 0f |
float | m_charWidthAdjDelta = 0 |
bool | m_enableWordWrapping = false |
bool | m_isCharacterWrappingEnabled = false |
bool | m_isNonBreakingSpace = false |
bool | m_isIgnoringAlignment |
float | m_wordWrappingRatios = 0.4f |
TextOverflowModes | m_overflowMode = TextOverflowModes.Overflow |
int | m_firstOverflowCharacterIndex = -1 |
TMP_Text | m_linkedTextComponent |
bool | m_isLinkedTextComponent |
bool | m_isTextTruncated |
bool | m_enableKerning |
bool | m_enableExtraPadding = false |
bool | checkPaddingRequired |
bool | m_isRichText = true |
bool | m_parseCtrlCharacters = true |
bool | m_isOverlay = false |
bool | m_isOrthographic = false |
bool | m_isCullingEnabled = false |
bool | m_ignoreRectMaskCulling |
bool | m_ignoreCulling = true |
TextureMappingOptions | m_horizontalMapping = TextureMappingOptions.Character |
TextureMappingOptions | m_verticalMapping = TextureMappingOptions.Character |
float | m_uvLineOffset = 0.0f |
TextRenderFlags | m_renderMode = TextRenderFlags.Render |
VertexSortingOrder | m_geometrySortingOrder |
int | m_firstVisibleCharacter |
int | m_maxVisibleCharacters = 99999 |
int | m_maxVisibleWords = 99999 |
int | m_maxVisibleLines = 99999 |
bool | m_useMaxVisibleDescender = true |
int | m_pageToDisplay = 1 |
bool | m_isNewPage = false |
Vector4 | m_margin = new Vector4(0, 0, 0, 0) |
float | m_marginLeft |
float | m_marginRight |
float | m_marginWidth |
float | m_marginHeight |
float | m_width = -1 |
TMP_TextInfo | m_textInfo |
bool | m_havePropertiesChanged |
bool | m_isUsingLegacyAnimationComponent |
Transform | m_transform |
RectTransform | m_rectTransform |
bool | m_autoSizeTextContainer |
Mesh | m_mesh |
bool | m_isVolumetricText |
TMP_SpriteAnimator | m_spriteAnimator |
float | m_flexibleHeight = -1f |
float | m_flexibleWidth = -1f |
float | m_minWidth |
float | m_minHeight |
float | m_maxWidth |
float | m_maxHeight |
LayoutElement | m_LayoutElement |
float | m_preferredWidth |
float | m_renderedWidth |
bool | m_isPreferredWidthDirty |
float | m_preferredHeight |
float | m_renderedHeight |
bool | m_isPreferredHeightDirty |
bool | m_isCalculatingPreferredValues |
int | m_layoutPriority = 0 |
bool | m_isCalculateSizeRequired = false |
bool | m_isLayoutDirty |
bool | m_verticesAlreadyDirty |
bool | m_layoutAlreadyDirty |
bool | m_isAwake |
bool | m_isWaitingOnResourceLoad |
bool | m_isInputParsingRequired = false |
TextInputSources | m_inputSource |
string | old_text |
float | m_fontScale |
float | m_fontScaleMultiplier |
char [] | m_htmlTag = new char[128] |
XML_TagAttribute [] | m_xmlAttribute = new XML_TagAttribute[8] |
float [] | m_attributeParameterValues = new float[16] |
float | tag_LineIndent = 0 |
float | tag_Indent = 0 |
TMP_XmlTagStack< float > | m_indentStack = new TMP_XmlTagStack<float>(new float[16]) |
bool | tag_NoParsing |
bool | m_isParsingText |
Matrix4x4 | m_FXMatrix |
bool | m_isFXMatrixSet |
int [] | m_char_buffer |
char [] | m_input_CharArray = new char[256] |
int | m_totalCharacterCount |
WordWrapState | m_SavedWordWrapState = new WordWrapState() |
WordWrapState | m_SavedLineState = new WordWrapState() |
int | m_characterCount |
int | m_firstCharacterOfLine |
int | m_firstVisibleCharacterOfLine |
int | m_lastCharacterOfLine |
int | m_lastVisibleCharacterOfLine |
int | m_lineNumber |
int | m_lineVisibleCharacterCount |
int | m_pageNumber |
float | m_maxAscender |
float | m_maxCapHeight |
float | m_maxDescender |
float | m_maxLineAscender |
float | m_maxLineDescender |
float | m_startOfLineAscender |
float | m_lineOffset |
Extents | m_meshExtents |
Color32 | m_htmlColor = new Color(255, 255, 255, 128) |
TMP_XmlTagStack< Color32 > | m_colorStack = new TMP_XmlTagStack<Color32>(new Color32[16]) |
TMP_XmlTagStack< Color32 > | m_underlineColorStack = new TMP_XmlTagStack<Color32>(new Color32[16]) |
TMP_XmlTagStack< Color32 > | m_strikethroughColorStack = new TMP_XmlTagStack<Color32>(new Color32[16]) |
TMP_XmlTagStack< Color32 > | m_highlightColorStack = new TMP_XmlTagStack<Color32>(new Color32[16]) |
TMP_ColorGradient | m_colorGradientPreset |
TMP_XmlTagStack< TMP_ColorGradient > | m_colorGradientStack = new TMP_XmlTagStack<TMP_ColorGradient>(new TMP_ColorGradient[16]) |
float | m_tabSpacing = 0 |
float | m_spacing = 0 |
TMP_XmlTagStack< int > | m_styleStack = new TMP_XmlTagStack<int>(new int[16]) |
TMP_XmlTagStack< int > | m_actionStack = new TMP_XmlTagStack<int>(new int[16]) |
float | m_padding = 0 |
float | m_baselineOffset |
TMP_XmlTagStack< float > | m_baselineOffsetStack = new TMP_XmlTagStack<float>(new float[16]) |
float | m_xAdvance |
TMP_TextElementType | m_textElementType |
TMP_TextElement | m_cached_TextElement |
TMP_Glyph | m_cached_Underline_GlyphInfo |
TMP_Glyph | m_cached_Ellipsis_GlyphInfo |
TMP_SpriteAsset | m_defaultSpriteAsset |
TMP_SpriteAsset | m_currentSpriteAsset |
int | m_spriteCount = 0 |
int | m_spriteIndex |
int | m_spriteAnimationID |
bool | m_ignoreActiveState |
Properties | |
string | text [get, set] |
A string containing the text to be displayed. More... | |
bool | isRightToLeftText [get, set] |
TMP_FontAsset | font [get, set] |
The Font Asset to be assigned to this text object. 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... | |
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... | |
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... | |
float | alpha [get, set] |
Sets the vertex color alpha value. More... | |
bool | enableVertexGradient [get, set] |
Determines if Vertex Color Gradient should be used 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... | |
TMP_SpriteAsset | spriteAsset [get, set] |
Default Sprite Asset used by the text object. More... | |
bool | tintAllSprites [get, set] |
Determines whether or not the sprite color is multiplies by the vertex color of the text. More... | |
bool | overrideColorTags [get, set] |
This overrides the color tags forcing the vertex colors to be the default font color. 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... | |
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... | |
float | fontSize [get, set] |
The point size of the font. More... | |
float | fontScale [get] |
The scale of the current 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... | |
float | pixelsPerUnit [get] |
bool | enableAutoSizing [get, set] |
Enable text auto-sizing More... | |
float | fontSizeMin [get, set] |
Minimum point size of the font when text auto-sizing is enabled. More... | |
float | fontSizeMax [get, set] |
Maximum point size of the font when text auto-sizing is enabled. More... | |
FontStyles | fontStyle [get, set] |
The style of the text More... | |
bool | isUsingBold [get] |
Property used in conjunction with padding calculation for the geometry. More... | |
TextAlignmentOptions | alignment [get, set] |
Text alignment options More... | |
float | characterSpacing [get, set] |
Use the extents of the text geometry for alignment instead of font metrics. More... | |
float | wordSpacing [get, set] |
The amount of additional spacing between words. More... | |
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... | |
float | paragraphSpacing [get, set] |
The amount of additional spacing to add between each lines of text. More... | |
float | characterWidthAdjustment [get, set] |
Percentage the width of characters can be adjusted before text auto-sizing begins to reduce the point size. 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... | |
float | wordWrappingRatios [get, set] |
Controls the blending between using character and word spacing to fill-in the space for justified text. More... | |
TextOverflowModes | overflowMode [get, set] |
bool | isTextOverflowing [get] |
Indicates if the text exceeds the vertical bounds of its text container. More... | |
int | firstOverflowCharacterIndex [get] |
The first character which exceeds the vertical bounds of its text container. More... | |
TMP_Text | linkedTextComponent [get, set] |
The linked text component used for flowing the text from one text component to another. More... | |
bool | isLinkedTextComponent [get, set] |
Indicates whether this text component is linked to another. More... | |
bool | isTextTruncated [get] |
Property indicating whether the text is Truncated or using Ellipsis. More... | |
bool | enableKerning [get, set] |
Determines if kerning is enabled or disabled. 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... | |
bool | richText [get, set] |
Enables or Disables Rich Text Tags More... | |
bool | parseCtrlCharacters [get, set] |
Enables or Disables parsing of CTRL characters in input text. 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 | isOrthographic [get, set] |
Sets Perspective Correction to Zero for Orthographic Camera mode & 0.875f for Perspective Camera mode. 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 | 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... | |
TextureMappingOptions | horizontalMapping [get, set] |
Controls how the face and outline textures will be applied to the text object. More... | |
TextureMappingOptions | verticalMapping [get, set] |
Controls how the face and outline textures will be applied to the text object. More... | |
float | mappingUvLineOffset [get, set] |
Controls the UV Offset for the various texture mapping mode on the text object. More... | |
TextRenderFlags | renderMode [get, set] |
Determines if the Mesh will be rendered. More... | |
VertexSortingOrder | geometrySortingOrder [get, set] |
Determines the sorting order of the geometry of the text object. More... | |
int | firstVisibleCharacter [get, set] |
The first character which should be made visible in conjunction with the Text Overflow Linked mode. More... | |
int | maxVisibleCharacters [get, set] |
Allows to control how many characters are visible from the input. More... | |
int | maxVisibleWords [get, set] |
Allows to control how many words are visible from the input. More... | |
int | maxVisibleLines [get, set] |
Allows control over how many lines of text are displayed. More... | |
bool | useMaxVisibleDescender [get, set] |
Determines if the text's vertical alignment will be adjusted based on visible descender of the text. More... | |
int | pageToDisplay [get, set] |
Controls which page of text is shown More... | |
virtual Vector4 | margin [get, set] |
The margins 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 | havePropertiesChanged [get, set] |
Property tracking if any of the text properties have changed. Flag is set before the text is regenerated. More... | |
bool | isUsingLegacyAnimationComponent [get, set] |
Property to handle legacy animation component. More... | |
new Transform | transform [get] |
Returns are reference to the Transform More... | |
new RectTransform | rectTransform [get] |
Returns are reference to the RectTransform More... | |
virtual bool | autoSizeTextContainer [get, set] |
Enables control over setting the size of the text container to match the text object. More... | |
virtual Mesh | mesh [get] |
The mesh used by the font asset and material assigned to the text object. More... | |
bool | isVolumetricText [get, set] |
Determines if the geometry of the characters will be quads or volumetric (cubes). More... | |
Bounds | bounds [get] |
Returns the bounds of the mesh of the text object in world space. More... | |
Bounds | textBounds [get] |
Returns the bounds of the text of the text object. More... | |
TMP_SpriteAnimator | spriteAnimator [get] |
Component used to control wrapping of text following some arbitrary shape. More... | |
float | flexibleHeight [get] |
float | flexibleWidth [get] |
float | minWidth [get] |
float | minHeight [get] |
float | maxWidth [get] |
float | maxHeight [get] |
LayoutElement | layoutElement [get] |
virtual float | preferredWidth [get] |
Computed preferred width of the text object. More... | |
virtual float | preferredHeight [get] |
Computed preferred height of the text object. More... | |
virtual float | renderedWidth [get] |
Compute the rendered width of the text object. More... | |
virtual float | renderedHeight [get] |
Compute the rendered height of the text object. More... | |
int | layoutPriority [get] |
Private Member Functions | |
internal void | SetTextInternal (string text) |
Internal function used by the Text Input Field to populate TMP_TextInfo data. More... | |
bool | ReplaceOpeningStyleTag (ref string sourceText, int srcIndex, out int srcOffset, ref int[] charBuffer, ref int writeIndex) |
Method to handle inline replacement of style tag by opening style definition. More... | |
bool | ReplaceOpeningStyleTag (ref int[] sourceText, int srcIndex, out int srcOffset, ref int[] charBuffer, ref int writeIndex) |
Method to handle inline replacement of style tag by opening style definition. More... | |
bool | ReplaceOpeningStyleTag (ref char[] sourceText, int srcIndex, out int srcOffset, ref int[] charBuffer, ref int writeIndex) |
Method to handle inline replacement of style tag by opening style definition. More... | |
bool | ReplaceOpeningStyleTag (ref StringBuilder sourceText, int srcIndex, out int srcOffset, ref int[] charBuffer, ref int writeIndex) |
Method to handle inline replacement of style tag by opening style definition. More... | |
bool | ReplaceClosingStyleTag (ref string sourceText, int srcIndex, ref int[] charBuffer, ref int writeIndex) |
Method to handle inline replacement of style tag by closing style definition. More... | |
bool | ReplaceClosingStyleTag (ref int[] sourceText, int srcIndex, ref int[] charBuffer, ref int writeIndex) |
Method to handle inline replacement of style tag by closing style definition. More... | |
bool | ReplaceClosingStyleTag (ref char[] sourceText, int srcIndex, ref int[] charBuffer, ref int writeIndex) |
Method to handle inline replacement of style tag by closing style definition. More... | |
bool | ReplaceClosingStyleTag (ref StringBuilder sourceText, int srcIndex, ref int[] charBuffer, ref int writeIndex) |
Method to handle inline replacement of style tag by closing style definition. More... | |
bool | IsTagName (ref string text, string tag, int index) |
Method to check for a matching rich text tag. More... | |
bool | IsTagName (ref char[] text, string tag, int index) |
Method to check for a matching rich text tag. More... | |
bool | IsTagName (ref int[] text, string tag, int index) |
Method to check for a matching rich text tag. More... | |
bool | IsTagName (ref StringBuilder text, string tag, int index) |
Method to check for a matching rich text tag. More... | |
int | GetTagHashCode (ref string text, int index, out int closeIndex) |
Get Hashcode for a given tag. More... | |
int | GetTagHashCode (ref char[] text, int index, out int closeIndex) |
Get Hashcode for a given tag. More... | |
int | GetTagHashCode (ref int[] text, int index, out int closeIndex) |
Get Hashcode for a given tag. More... | |
int | GetTagHashCode (ref StringBuilder text, int index, out int closeIndex) |
Get Hashcode for a given tag. More... | |
void | ResizeInternalArray< T > (ref T[] array) |
int | GetAttributeParameters (char[] chars, int startIndex, int length, ref float[] parameters) |
Method which returns the number of parameters used in a tag attribute and populates an array with such values. More... | |
Private Attributes | |
int | m_recursiveCount |
TMP_CharacterInfo [] | m_internalCharacterInfo |
int | m_charArray_Length = 0 |
readonly float [] | k_Power = { 5e-1f, 5e-2f, 5e-3f, 5e-4f, 5e-5f, 5e-6f, 5e-7f, 5e-8f, 5e-9f, 5e-10f } |
Base class which contains common properties and functions shared between the TextMeshPro and TextMeshProUGUI component.
Definition at line 110 of file TMP_Text.cs.
|
inlineprotected |
Function used in conjunction with SetText()
number | |
index | |
precision |
Definition at line 3326 of file TMP_Text.cs.
|
inlineprotected |
// Function used in conjunction with SetText()
number | |
index | |
precision |
Definition at line 3363 of file TMP_Text.cs.
|
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.
Definition at line 4498 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Method to calculate the preferred width and height of the text object.
Definition at line 3677 of file TMP_Text.cs.
|
inlinevirtual |
Function to clear the geometry of the Primary and Sub Text objects.
Reimplemented in TMPro.TextMeshProUGUI.
Definition at line 5521 of file TMP_Text.cs.
|
inlinevirtual |
Function to clear the geometry of the Primary and Sub Text objects.
Reimplemented in TMPro.TextMeshPro.
Definition at line 5527 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Destroy Sub Mesh Objects.
Reimplemented in TMPro.TextMeshPro.
Definition at line 5515 of file TMP_Text.cs.
|
inlinevirtual |
Function to force an update of the margin size.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 4544 of file TMP_Text.cs.
|
inlineprotected |
Extracts a float value from char[] assuming we know the position of the start, end and decimal point.
chars | |
startIndex | |
length |
Definition at line 5894 of file TMP_Text.cs.
|
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.
Definition at line 5909 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Method to set the materials of the text and sub text objects.
mats |
Function used to create an instance of the material
source |
Definition at line 1463 of file TMP_Text.cs.
|
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? |
Definition at line 1650 of file TMP_Text.cs.
|
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? |
Definition at line 1637 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Method to add the underline geometry.
start | |
end | |
startScale | |
endScale | |
maxScale | |
underlineColor |
Definition at line 5167 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Store vertex attributes into the appropriate TMP_MeshInfo.
i | |
index_X4 |
Definition at line 4977 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Fill Vertex Buffers for Sprites
i | |
spriteIndex_X4 |
Definition at line 5112 of file TMP_Text.cs.
|
inlinevirtual |
Function to force the regeneration of the text object.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 1555 of file TMP_Text.cs.
|
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.
Definition at line 1569 of file TMP_Text.cs.
|
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.
Definition at line 3404 of file TMP_Text.cs.
|
inlineprivate |
Method which returns the number of parameters used in a tag attribute and populates an array with such values.
chars | Char[] containing the tag attribute and data |
startIndex | The index of the first char of the data |
length | The length of the data |
parameters | The number of parameters contained in the Char[] |
Definition at line 5868 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Method returning the compound bounds of the text object and child sub objects.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 4424 of file TMP_Text.cs.
|
inlineprotected |
|
inlineprotectedvirtual |
Function called internally when a new material is assigned via the fontMaterial property.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 1427 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Method returning instances of the materials used by the text object.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 1450 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Get the padding value for the currently assigned material
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 1533 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Get the padding value for the given material
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 1540 of file TMP_Text.cs.
|
inlinevirtual |
Function which returns the text after it has been parsed and rich text tags removed.
Definition at line 5534 of file TMP_Text.cs.
|
inlineprotected |
Method to calculate the preferred height of a text object.
Definition at line 3563 of file TMP_Text.cs.
|
inlineprotected |
Method to calculate the preferred height of a text object.
margin |
Definition at line 3598 of file TMP_Text.cs.
|
inline |
Function to Calculate the Preferred Width and Height of the text object.
Definition at line 3411 of file TMP_Text.cs.
|
inline |
Function to Calculate the Preferred Width and Height of the text object given the provided width and height.
Definition at line 3433 of file TMP_Text.cs.
|
inline |
Function to Calculate the Preferred Width and Height of the text object given a certain string.
text |
Definition at line 3458 of file TMP_Text.cs.
|
inline |
Function to Calculate the Preferred Width and Height of the text object given a certain string and size of text container.
text |
Definition at line 3482 of file TMP_Text.cs.
|
inlineprotected |
Method to calculate the preferred width of a text object.
Definition at line 3505 of file TMP_Text.cs.
|
inlineprotected |
Method to calculate the preferred width of a text object.
margin |
Definition at line 3541 of file TMP_Text.cs.
|
inlineprotected |
Method returning the rendered height of the text object.
Definition at line 3658 of file TMP_Text.cs.
|
inlineprotected |
Method returning the rendered height of the text object.
Definition at line 3667 of file TMP_Text.cs.
|
inline |
Method returning the rendered width and height of the text object.
Definition at line 3620 of file TMP_Text.cs.
|
inline |
onlyVisibleCharacters | Should returned value only factor in visible characters and exclude those greater than maxVisibleCharacters for instance. |
Definition at line 3630 of file TMP_Text.cs.
|
inlineprotected |
Method returning the rendered width of the text object.
Definition at line 3640 of file TMP_Text.cs.
|
inlineprotected |
Method returning the rendered width of the text object.
Definition at line 3649 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Method which returns an array containing the materials used by the text object.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 1439 of file TMP_Text.cs.
|
inlineprotected |
Method used to find and cache references to the Underline and Ellipsis characters.
Definition at line 5434 of file TMP_Text.cs.
|
inlineprivate |
Get Hashcode for a given tag.
text | |
index | |
closeIndex |
Definition at line 3210 of file TMP_Text.cs.
|
inlineprivate |
Get Hashcode for a given tag.
text | |
index | |
closeIndex |
Definition at line 3236 of file TMP_Text.cs.
|
inlineprivate |
Get Hashcode for a given tag.
text | |
index | |
closeIndex |
Definition at line 3262 of file TMP_Text.cs.
|
inlineprivate |
Get Hashcode for a given tag.
text | |
index | |
closeIndex |
Definition at line 3288 of file TMP_Text.cs.
|
inlineprotected |
Method which returns the bounds of the text object;
Definition at line 4431 of file TMP_Text.cs.
|
inlineprotected |
Method which returns the bounds of the text object;
onlyVisibleCharacters |
Definition at line 4463 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Method to return the local corners of the Text Container or RectTransform.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 1547 of file TMP_Text.cs.
|
inlinevirtual |
Function used to evaluate the length of a text string.
text |
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 4538 of file TMP_Text.cs.
|
inlineprotected |
Convert UTF-16 Hex to Char
i | The index. |
Definition at line 5683 of file TMP_Text.cs.
|
inlineprotected |
Convert UTF-16 Hex to Char
i | The index. |
Definition at line 5698 of file TMP_Text.cs.
|
inlineprotected |
Convert UTF-32 Hex to Char
i | The index. |
Definition at line 5714 of file TMP_Text.cs.
|
inlineprotected |
Convert UTF-32 Hex to Char
i | The index. |
Definition at line 5733 of file TMP_Text.cs.
|
inlineprotected |
Method to convert Hex color values to Color32
hexChars | |
tagCount |
Definition at line 5754 of file TMP_Text.cs.
|
inlineprotected |
Method to convert Hex Color values to Color32
hexChars | |
startIndex | |
length |
Definition at line 5836 of file TMP_Text.cs.
|
inlineprotected |
Function to pack scale information in the UV2 Channel.
x | |
y | |
scale |
x | |
y |
Method to convert Hex to Int
hex |
Definition at line 5647 of file TMP_Text.cs.
|
inlineprotectedvirtual |
alpha | |
duration | |
ignoreTimeScale |
Reimplemented in TMPro.TextMeshProUGUI.
Definition at line 1674 of file TMP_Text.cs.
|
inlineprotectedvirtual |
targetColor | |
duration | |
ignoreTimeScale | |
useAlpha | |
useRGB |
Reimplemented in TMPro.TextMeshProUGUI.
Definition at line 1665 of file TMP_Text.cs.
|
inlineprivate |
Method to check for a matching rich text tag.
text | |
tag | |
index |
Definition at line 3134 of file TMP_Text.cs.
|
inlineprivate |
Method to check for a matching rich text tag.
text | |
tag | |
index |
Definition at line 3153 of file TMP_Text.cs.
|
inlineprivate |
Method to check for a matching rich text tag.
text | |
tag | |
index |
Definition at line 3172 of file TMP_Text.cs.
|
inlineprivate |
Method to check for a matching rich text tag.
text | |
tag | |
index |
Definition at line 3191 of file TMP_Text.cs.
|
inlineprotected |
Internal function used to load the default settings of text objects.
Definition at line 5394 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Method which derived classes need to override to load Font Assets.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 1416 of file TMP_Text.cs.
|
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 |
Definition at line 5580 of file TMP_Text.cs.
|
inlineprotected |
|
inlineprotected |
Method to parse the input text based on its source
Definition at line 1680 of file TMP_Text.cs.
|
inlineprivate |
Method to handle inline replacement of style tag by closing style definition.
sourceText | |
srcIndex | |
charBuffer | |
writeIndex |
Definition at line 2860 of file TMP_Text.cs.
|
inlineprivate |
Method to handle inline replacement of style tag by closing style definition.
sourceText | |
srcIndex | |
charBuffer | |
writeIndex |
Definition at line 2929 of file TMP_Text.cs.
|
inlineprivate |
Method to handle inline replacement of style tag by closing style definition.
sourceText | |
srcIndex | |
charBuffer | |
writeIndex |
Definition at line 2998 of file TMP_Text.cs.
|
inlineprivate |
Method to handle inline replacement of style tag by closing style definition.
sourceText | |
srcIndex | |
charBuffer | |
writeIndex |
Definition at line 3066 of file TMP_Text.cs.
|
inlineprivate |
Method to handle inline replacement of style tag by opening style definition.
sourceText | |
srcIndex | |
srcOffset | |
charBuffer | |
writeIndex |
Definition at line 2577 of file TMP_Text.cs.
|
inlineprivate |
Method to handle inline replacement of style tag by opening style definition.
sourceText | |
srcIndex | |
srcOffset | |
charBuffer | |
writeIndex |
Definition at line 2648 of file TMP_Text.cs.
|
inlineprivate |
Method to handle inline replacement of style tag by opening style definition.
sourceText | |
srcIndex | |
srcOffset | |
charBuffer | |
writeIndex |
Definition at line 2719 of file TMP_Text.cs.
|
inlineprivate |
Method to handle inline replacement of style tag by opening style definition.
sourceText | |
srcIndex | |
srcOffset | |
charBuffer | |
writeIndex |
Definition at line 2790 of file TMP_Text.cs.
|
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. |
Definition at line 5459 of file TMP_Text.cs.
|
inlineprivate |
Definition at line 3310 of file TMP_Text.cs.
|
inlineprotected |
Function to increase the size of the Line Extents Array.
size |
Definition at line 4505 of file TMP_Text.cs.
|
inlineprotected |
Restore the State of various variables used in the mesh creation loop.
state |
Definition at line 4682 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Store vertex information for each character.
style_padding | Style_padding. |
vertexColor | Vertex color. |
Definition at line 4763 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Store vertex information for each sprite.
padding | |
style_padding | |
vertexColor |
Definition at line 4886 of file TMP_Text.cs.
|
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 |
Definition at line 4604 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Method to Enable or Disable child SubMesh objects.
state |
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 5509 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Method used to determine the number of visible characters and required buffer allocations.
chars |
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 3398 of file TMP_Text.cs.
|
inline |
Character array containing the text to be displayed.
sourceText |
Definition at line 1882 of file TMP_Text.cs.
|
inline |
Character array containing the text to be displayed.
sourceText |
Definition at line 1986 of file TMP_Text.cs.
|
inline |
Character array containing the text to be displayed.
sourceText |
Definition at line 2099 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Set the culling mode on the material.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 1527 of file TMP_Text.cs.
|
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.
Definition at line 1505 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Function called internally when assigning a new base material.
mat |
Definition at line 1433 of file TMP_Text.cs.
|
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.
Definition at line 1511 of file TMP_Text.cs.
|
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.
Definition at line 1517 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Set the Render Queue and ZTest mode on the current material
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 1522 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Function called internally when a new shared material is assigned via the fontSharedMaterial property.
mat |
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 1422 of file TMP_Text.cs.
|
inlineprotectedvirtual |
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 1444 of file TMP_Text.cs.
|
inline |
text |
Definition at line 1709 of file TMP_Text.cs.
|
inline |
text |
Definition at line 1719 of file TMP_Text.cs.
|
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. |
Definition at line 1752 of file TMP_Text.cs.
|
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. |
Definition at line 1765 of file TMP_Text.cs.
|
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. |
Definition at line 1779 of file TMP_Text.cs.
|
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. |
Definition at line 1858 of file TMP_Text.cs.
|
inlineprotected |
Copies Content of formatted SetText() to charBuffer.
sourceText | |
charBuffer |
Definition at line 2211 of file TMP_Text.cs.
|
inlineprivate |
Internal function used by the Text Input Field to populate TMP_TextInfo data.
Definition at line 1575 of file TMP_Text.cs.
|
inlineprotected |
Function to control the sorting of the geometry of the text object.
Definition at line 1487 of file TMP_Text.cs.
|
inlineprotected |
Function to sort the geometry of the text object in accordance to the provided order.
order |
Definition at line 1496 of file TMP_Text.cs.
|
inlinevirtual |
Function to push a new set of vertices to the mesh.
vertices |
Definition at line 1615 of file TMP_Text.cs.
|
inlineprotected |
Copy contents of StringBuilder into int array.
sourceText | Text to copy. |
charBuffer | Array to store contents. |
Definition at line 2431 of file TMP_Text.cs.
|
inlineprotected |
Method to store the content of a string into an integer array.
sourceText | |
charBuffer |
Definition at line 2286 of file TMP_Text.cs.
|
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.
Definition at line 1596 of file TMP_Text.cs.
|
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.
Definition at line 1621 of file TMP_Text.cs.
|
inlinevirtual |
Function to push the updated vertex data into the mesh and renderer.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 1602 of file TMP_Text.cs.
|
inlinevirtual |
Function to push the updated vertex data into the mesh and renderer.
Reimplemented in TMPro.TextMeshProUGUI, and TMPro.TextMeshPro.
Definition at line 1608 of file TMP_Text.cs.
|
inlineprotected |
Function to identify and validate the rich tag. Returns the position of the > if the tag was valid.
chars | |
startIndex | |
endIndex |
Definition at line 5979 of file TMP_Text.cs.
|
getset |
Text alignment options
Definition at line 507 of file TMP_Text.cs.
|
getset |
Sets the vertex color alpha value.
Definition at line 247 of file TMP_Text.cs.
|
getset |
Enables control over setting the size of the text container to match the text object.
Definition at line 1078 of file TMP_Text.cs.
|
get |
Returns the bounds of the mesh of the text object in world space.
Definition at line 1110 of file TMP_Text.cs.
|
getset |
Use the extents of the text geometry for alignment instead of font metrics.
The amount of additional spacing between characters.
Definition at line 536 of file TMP_Text.cs.
|
getset |
Percentage the width of characters can be adjusted before text auto-sizing begins to reduce the point size.
Definition at line 598 of file TMP_Text.cs.
|
getset |
This is the default vertex color assigned to each vertices. Color tags will override vertex colors unless the overrideColorTags is set.
Definition at line 228 of file TMP_Text.cs.
|
getset |
Sets the vertex colors for each of the 4 vertices of the character quads.
The color gradient.
Definition at line 273 of file TMP_Text.cs.
|
getset |
Set the vertex colors of the 4 vertices of each character quads.
Definition at line 285 of file TMP_Text.cs.
|
getset |
Enable text auto-sizing
Definition at line 449 of file TMP_Text.cs.
|
getset |
Sets the culling on the shaders. Note changing this value will result in an instance of the material.
Definition at line 822 of file TMP_Text.cs.
|
getset |
Determines if kerning is enabled or disabled.
Definition at line 749 of file TMP_Text.cs.
|
getset |
Determines if Vertex Color Gradient should be used
true
if enable vertex gradient; otherwise, false
.
Definition at line 258 of file TMP_Text.cs.
|
getset |
Controls whether or not word wrapping is applied. When disabled, the text will be displayed on a single line.
Definition at line 611 of file TMP_Text.cs.
|
getset |
Adds extra padding around each character. This may be necessary when the displayed text is very small to prevent clipping.
Definition at line 761 of file TMP_Text.cs.
|
getset |
Sets the color of the _FaceColor property of the assigned material. Changing face color will result in an instance of the material.
Definition at line 335 of file TMP_Text.cs.
|
get |
The first character which exceeds the vertical bounds of its text container.
Definition at line 671 of file TMP_Text.cs.
|
getset |
The first character which should be made visible in conjunction with the Text Overflow Linked mode.
Definition at line 929 of file TMP_Text.cs.
|
get |
Definition at line 1214 of file TMP_Text.cs.
|
get |
Definition at line 1220 of file TMP_Text.cs.
|
getset |
The Font Asset to be assigned to this text object.
Definition at line 141 of file TMP_Text.cs.
|
getset |
The material to be assigned to this text object. An instance of the material will be assigned to the object's renderer.
Definition at line 186 of file TMP_Text.cs.
|
getset |
The materials to be assigned to this text object. An instance of the materials will be assigned.
Definition at line 213 of file TMP_Text.cs.
|
get |
The scale of the current text.
Definition at line 406 of file TMP_Text.cs.
|
getset |
The material to be assigned to this text object.
Definition at line 155 of file TMP_Text.cs.
|
getset |
An array containing the materials used by the text object.
Definition at line 174 of file TMP_Text.cs.
|
getset |
The point size of the font.
Definition at line 390 of file TMP_Text.cs.
|
getset |
Maximum point size of the font when text auto-sizing is enabled.
Definition at line 475 of file TMP_Text.cs.
|
getset |
Minimum point size of the font when text auto-sizing is enabled.
Definition at line 463 of file TMP_Text.cs.
|
getset |
The style of the text
Definition at line 487 of file TMP_Text.cs.
|
getset |
Control the weight of the font if an alternative font asset is assigned for the given weight in the font asset editor.
Definition at line 415 of file TMP_Text.cs.
|
getset |
Determines the sorting order of the geometry of the text object.
Definition at line 916 of file TMP_Text.cs.
|
getset |
Property tracking if any of the text properties have changed. Flag is set before the text is regenerated.
Definition at line 1024 of file TMP_Text.cs.
|
getset |
Controls how the face and outline textures will be applied to the text object.
Definition at line 857 of file TMP_Text.cs.
|
getset |
Controls whether or not the text object will be culled when using a 2D Rect Mask.
Definition at line 833 of file TMP_Text.cs.
|
getset |
Forces objects that are not visible to get refreshed.
Definition at line 845 of file TMP_Text.cs.
|
getset |
Indicates whether this text component is linked to another.
Definition at line 717 of file TMP_Text.cs.
|
getset |
Sets Perspective Correction to Zero for Orthographic Camera mode & 0.875f for Perspective Camera mode.
Definition at line 810 of file TMP_Text.cs.
|
getset |
Sets the RenderQueue along with Ztest to force the text to be drawn last and on top of scene elements.
Definition at line 799 of file TMP_Text.cs.
|
getset |
Definition at line 129 of file TMP_Text.cs.
|
get |
Indicates if the text exceeds the vertical bounds of its text container.
Definition at line 662 of file TMP_Text.cs.
|
get |
Property indicating whether the text is Truncated or using Ellipsis.
Definition at line 740 of file TMP_Text.cs.
|
get |
Property used in conjunction with padding calculation for the geometry.
Definition at line 499 of file TMP_Text.cs.
|
getset |
Property to handle legacy animation component.
Definition at line 1036 of file TMP_Text.cs.
|
getset |
Determines if the geometry of the characters will be quads or volumetric (cubes).
Definition at line 1099 of file TMP_Text.cs.
|
getprotected |
Definition at line 1251 of file TMP_Text.cs.
|
get |
Definition at line 1298 of file TMP_Text.cs.
|
getset |
The amount of additional spacing to add between each lines of text.
Definition at line 560 of file TMP_Text.cs.
|
getset |
The amount of potential line spacing adjustment before text auto sizing kicks in.
Definition at line 574 of file TMP_Text.cs.
|
getset |
The linked text component used for flowing the text from one text component to another.
Definition at line 682 of file TMP_Text.cs.
|
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.
Definition at line 893 of file TMP_Text.cs.
|
getset |
The margins of the text object.
Definition at line 997 of file TMP_Text.cs.
|
get |
Definition at line 1244 of file TMP_Text.cs.
|
getset |
Allows to control how many characters are visible from the input.
Definition at line 940 of file TMP_Text.cs.
|
getset |
Allows control over how many lines of text are displayed.
Definition at line 962 of file TMP_Text.cs.
|
getset |
Allows to control how many words are visible from the input.
Definition at line 951 of file TMP_Text.cs.
|
get |
Definition at line 1238 of file TMP_Text.cs.
|
get |
The mesh used by the font asset and material assigned to the text object.
Definition at line 1089 of file TMP_Text.cs.
|
get |
Definition at line 1232 of file TMP_Text.cs.
|
get |
Definition at line 1226 of file TMP_Text.cs.
|
getset |
Sets the color of the _OutlineColor property of the assigned material. Changing outline color will result in an instance of the material.
Definition at line 354 of file TMP_Text.cs.
|
getset |
Sets the thickness of the outline of the font. Setting this value will result in an instance of the material.
Definition at line 373 of file TMP_Text.cs.
|
getset |
Controls the Text Overflow Mode
Definition at line 650 of file TMP_Text.cs.
|
getset |
This overrides the color tags forcing the vertex colors to be the default font color.
Definition at line 323 of file TMP_Text.cs.
|
getset |
Controls which page of text is shown
Definition at line 985 of file TMP_Text.cs.
|
getset |
The amount of additional spacing to add between each lines of text.
Definition at line 586 of file TMP_Text.cs.
|
getset |
Enables or Disables parsing of CTRL characters in input text.
Definition at line 787 of file TMP_Text.cs.
|
get |
Definition at line 428 of file TMP_Text.cs.
|
get |
Computed preferred height of the text object.
Definition at line 1275 of file TMP_Text.cs.
|
get |
Computed preferred width of the text object.
Definition at line 1267 of file TMP_Text.cs.
|
get |
Returns are reference to the RectTransform
Definition at line 1063 of file TMP_Text.cs.
|
get |
Compute the rendered height of the text object.
Definition at line 1292 of file TMP_Text.cs.
|
get |
Compute the rendered width of the text object.
Definition at line 1286 of file TMP_Text.cs.
|
getset |
Determines if the Mesh will be rendered.
Definition at line 905 of file TMP_Text.cs.
|
getset |
Enables or Disables Rich Text Tags
Definition at line 775 of file TMP_Text.cs.
|
getprotected |
Component used to control wrapping of text following some arbitrary shape.
Component used to control and animate sprites in the text object.
Definition at line 1177 of file TMP_Text.cs.
|
getset |
Default Sprite Asset used by the text object.
Definition at line 297 of file TMP_Text.cs.
|
getset |
A string containing the text to be displayed.
Definition at line 116 of file TMP_Text.cs.
|
get |
Returns the bounds of the text of the text object.
Definition at line 1123 of file TMP_Text.cs.
|
get |
Returns data about the text object which includes information about each character, word, line, link, etc.
Definition at line 1014 of file TMP_Text.cs.
|
getset |
Determines whether or not the sprite color is multiplies by the vertex color of the text.
Definition at line 309 of file TMP_Text.cs.
|
get |
Returns are reference to the Transform
Definition at line 1048 of file TMP_Text.cs.
|
getset |
Determines if the text's vertical alignment will be adjusted based on visible descender of the text.
Definition at line 973 of file TMP_Text.cs.
|
getset |
Controls how the face and outline textures will be applied to the text object.
Definition at line 869 of file TMP_Text.cs.
|
getset |
The amount of additional spacing between words.
Definition at line 549 of file TMP_Text.cs.
|
getset |
Controls the blending between using character and word spacing to fill-in the space for justified text.
Definition at line 625 of file TMP_Text.cs.