Class TMP_Settings
Namespace: TMPro
Syntax
[Serializable]
public class TMP_Settings : ScriptableObject
Properties
autoSizeTextContainer
Set the size of the text container of newly created text objects to match the size of the text.
Declaration
public static bool autoSizeTextContainer { get; }
Property Value
defaultColorGradientPresetsPath
The relative path to a Resources folder in the project that contains Color Gradient Presets.
Declaration
public static string defaultColorGradientPresetsPath { get; }
Property Value
defaultFontAsset
Returns the Default Font Asset to be used by newly created text objects.
Declaration
public static TMP_FontAsset defaultFontAsset { get; }
Property Value
defaultFontAssetPath
The relative path to a Resources folder in the project.
Declaration
public static string defaultFontAssetPath { get; }
Property Value
defaultFontSize
The Default Point Size of newly created text objects.
Declaration
public static float defaultFontSize { get; }
Property Value
defaultSpriteAsset
The Default Sprite Asset to be used by default.
Declaration
public static TMP_SpriteAsset defaultSpriteAsset { get; }
Property Value
defaultSpriteAssetPath
The relative path to a Resources folder in the project.
Declaration
public static string defaultSpriteAssetPath { get; }
Property Value
defaultStyleSheet
The Default Style Sheet used by the text objects.
Declaration
public static TMP_StyleSheet defaultStyleSheet { get; }
Property Value
defaultTextAutoSizingMaxRatio
The multiplier used to computer the default Max point size when Text Auto Sizing is used.
Declaration
public static float defaultTextAutoSizingMaxRatio { get; }
Property Value
defaultTextAutoSizingMinRatio
The multiplier used to computer the default Min point size when Text Auto Sizing is used.
Declaration
public static float defaultTextAutoSizingMinRatio { get; }
Property Value
defaultTextMeshProTextContainerSize
The Default Size of the Text Container of a TextMeshPro object.
Declaration
public static Vector2 defaultTextMeshProTextContainerSize { get; }
Property Value
defaultTextMeshProUITextContainerSize
The Default Width of the Text Container of a TextMeshProUI object.
Declaration
public static Vector2 defaultTextMeshProUITextContainerSize { get; }
Property Value
enableEmojiSupport
Determines if Emoji support is enabled in the Input Field TouchScreenKeyboard.
Declaration
public static bool enableEmojiSupport { get; set; }
Property Value
Controls if Extra Padding is enabled on newly created text objects by default.
Declaration
public static bool enableExtraPadding { get; }
Property Value
enableKerning
Controls if Kerning is enabled on newly created text objects by default.
Declaration
public static bool enableKerning { get; }
Property Value
enableParseEscapeCharacters
Controls if Escape Characters will be parsed in the Text Input Box on newly created text objects.
Declaration
public static bool enableParseEscapeCharacters { get; }
Property Value
enableRaycastTarget
Controls if Raycast Target is enabled by default on newly created text objects.
Declaration
public static bool enableRaycastTarget { get; }
Property Value
enableTintAllSprites
Controls if TintAllSprites is enabled on newly created text objects by default.
Declaration
public static bool enableTintAllSprites { get; }
Property Value
enableWordWrapping
Controls if Word Wrapping will be enabled on newly created text objects by default.
Declaration
public static bool enableWordWrapping { get; }
Property Value
fallbackFontAssets
Returns the list of Fallback Fonts defined in the TMP Settings file.
Declaration
public static List<TMP_FontAsset> fallbackFontAssets { get; }
Property Value
followingCharacters
Text file that contains the following characters used for line breaking for Asian languages.
Declaration
public static TextAsset followingCharacters { get; }
Property Value
getFontFeaturesAtRuntime
Determines if OpenType Font Features should be retrieved at runtime from the source font file.
Declaration
public static bool getFontFeaturesAtRuntime { get; }
Property Value
instance
Get a singleton instance of the settings class.
Declaration
public static TMP_Settings instance { get; }
Property Value
leadingCharacters
Text file that contains the leading characters used for line breaking for Asian languages.
Declaration
public static TextAsset leadingCharacters { get; }
Property Value
linebreakingRules
Declaration
public static TMP_Settings.LineBreakingTable linebreakingRules { get; }
Property Value
matchMaterialPreset
Controls whether or not TMP will create a matching material preset or use the default material of the fallback font asset.
Declaration
public static bool matchMaterialPreset { get; }
Property Value
missingGlyphCharacter
The character that will be used as a replacement for missing glyphs in a font asset.
Declaration
public static int missingGlyphCharacter { get; set; }
Property Value
version
Returns the release version of the product.
Declaration
public static string version { get; }
Property Value
warningsDisabled
Controls the display of warning message in the console.
Declaration
public static bool warningsDisabled { get; }
Property Value
Methods
GetFontAsset()
Returns the Font Asset defined in the TMP Settings file.
Declaration
public static TMP_FontAsset GetFontAsset()
Returns
GetSettings()
Returns the Sprite Asset defined in the TMP Settings file.
Declaration
public static TMP_Settings GetSettings()
Returns
GetSpriteAsset()
Returns the Sprite Asset defined in the TMP Settings file.
Declaration
public static TMP_SpriteAsset GetSpriteAsset()
Returns
GetStyleSheet()
Returns the Sprite Asset defined in the TMP Settings file.
Declaration
public static TMP_StyleSheet GetStyleSheet()
Returns
LoadDefaultSettings()
Static Function to load the TMP Settings file.
Declaration
public static TMP_Settings LoadDefaultSettings()
Returns
LoadLinebreakingRules()
Declaration
public static void LoadLinebreakingRules()
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.