docs.unity3d.com
    Show / Hide Table of Contents

    Class TMP_Settings

    Inheritance
    System.Object
    Object
    ScriptableObject
    TMP_Settings
    Inherited Members
    UnityEngine.ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(String)
    ScriptableObject.CreateInstance(Type)
    UnityEngine.ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    UnityEngine.Object.GetHashCode()
    UnityEngine.Object.Equals(System.Object)
    UnityEngine.Object.InstantiateAsync<T>(T)
    UnityEngine.Object.InstantiateAsync<T>(T, UnityEngine.Transform)
    UnityEngine.Object.InstantiateAsync<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion)
    UnityEngine.Object.InstantiateAsync<T>(T, UnityEngine.Transform, UnityEngine.Vector3, UnityEngine.Quaternion)
    UnityEngine.Object.InstantiateAsync<T>(T, System.Int32)
    UnityEngine.Object.InstantiateAsync<T>(T, System.Int32, UnityEngine.Transform)
    UnityEngine.Object.InstantiateAsync<T>(T, System.Int32, UnityEngine.Vector3, UnityEngine.Quaternion)
    UnityEngine.Object.InstantiateAsync<T>(T, System.Int32, System.ReadOnlySpan<UnityEngine.Vector3>, System.ReadOnlySpan<UnityEngine.Quaternion>)
    UnityEngine.Object.InstantiateAsync<T>(T, System.Int32, UnityEngine.Transform, UnityEngine.Vector3, UnityEngine.Quaternion)
    UnityEngine.Object.InstantiateAsync<T>(T, System.Int32, UnityEngine.Transform, UnityEngine.Vector3, UnityEngine.Quaternion, System.Threading.CancellationToken)
    UnityEngine.Object.InstantiateAsync<T>(T, System.Int32, UnityEngine.Transform, System.ReadOnlySpan<UnityEngine.Vector3>, System.ReadOnlySpan<UnityEngine.Quaternion>)
    UnityEngine.Object.InstantiateAsync<T>(T, System.Int32, UnityEngine.Transform, System.ReadOnlySpan<UnityEngine.Vector3>, System.ReadOnlySpan<UnityEngine.Quaternion>, System.Threading.CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    UnityEngine.Object.Instantiate<T>(T)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform, System.Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, Boolean)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    UnityEngine.Object.DestroyObject(UnityEngine.Object, System.Single)
    UnityEngine.Object.DestroyObject(UnityEngine.Object)
    UnityEngine.Object.FindSceneObjectsOfType(System.Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    UnityEngine.Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
    UnityEngine.Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    UnityEngine.Object.FindFirstObjectByType<T>()
    UnityEngine.Object.FindAnyObjectByType<T>()
    UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
    UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, Boolean)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: TMPro
    Syntax
    [Serializable]
    [ExecuteInEditMode]
    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
    Type Description
    System.Boolean

    defaultColorGradientPresetsPath

    The relative path to a Resources folder in the project that contains Color Gradient Presets.

    Declaration
    public static string defaultColorGradientPresetsPath { get; }
    Property Value
    Type Description
    System.String

    defaultFontAsset

    Returns the Default Font Asset to be used by newly created text objects.

    Declaration
    public static TMP_FontAsset defaultFontAsset { get; }
    Property Value
    Type Description
    TMP_FontAsset

    defaultFontAssetPath

    The relative path to a Resources folder in the project.

    Declaration
    public static string defaultFontAssetPath { get; }
    Property Value
    Type Description
    System.String

    defaultFontSize

    The Default Point Size of newly created text objects.

    Declaration
    public static float defaultFontSize { get; }
    Property Value
    Type Description
    System.Single

    defaultSpriteAsset

    The Default Sprite Asset to be used by default.

    Declaration
    public static TMP_SpriteAsset defaultSpriteAsset { get; }
    Property Value
    Type Description
    TMP_SpriteAsset

    defaultSpriteAssetPath

    The relative path to a Resources folder in the project.

    Declaration
    public static string defaultSpriteAssetPath { get; }
    Property Value
    Type Description
    System.String

    defaultStyleSheet

    The Default Style Sheet used by the text objects.

    Declaration
    public static TMP_StyleSheet defaultStyleSheet { get; }
    Property Value
    Type Description
    TMP_StyleSheet

    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
    Type Description
    System.Single

    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
    Type Description
    System.Single

    defaultTextMeshProTextContainerSize

    The Default Size of the Text Container of a TextMeshPro object.

    Declaration
    public static Vector2 defaultTextMeshProTextContainerSize { get; }
    Property Value
    Type Description
    Vector2

    defaultTextMeshProUITextContainerSize

    The Default Width of the Text Container of a TextMeshProUI object.

    Declaration
    public static Vector2 defaultTextMeshProUITextContainerSize { get; }
    Property Value
    Type Description
    Vector2

    enableEmojiSupport

    Determines if Emoji support is enabled in the Input Field TouchScreenKeyboard.

    Declaration
    public static bool enableEmojiSupport { get; set; }
    Property Value
    Type Description
    System.Boolean

    enableExtraPadding

    Controls if Extra Padding is enabled on newly created text objects by default.

    Declaration
    public static bool enableExtraPadding { get; }
    Property Value
    Type Description
    System.Boolean

    enableKerning

    Controls if Kerning is enabled on newly created text objects by default.

    Declaration
    public static bool enableKerning { get; }
    Property Value
    Type Description
    System.Boolean

    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
    Type Description
    System.Boolean

    enableTintAllSprites

    Controls if TintAllSprites is enabled on newly created text objects by default.

    Declaration
    public static bool enableTintAllSprites { get; }
    Property Value
    Type Description
    System.Boolean

    enableWordWrapping

    Controls if Word Wrapping will be enabled on newly created text objects by default.

    Declaration
    public static bool enableWordWrapping { get; }
    Property Value
    Type Description
    System.Boolean

    fallbackFontAssets

    Returns the list of Fallback Fonts defined in the TMP Settings file.

    Declaration
    public static List<TMP_FontAsset> fallbackFontAssets { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<TMP_FontAsset>

    followingCharacters

    Text file that contains the following characters used for line breaking for Asian languages.

    Declaration
    public static TextAsset followingCharacters { get; }
    Property Value
    Type Description
    TextAsset

    instance

    Get a singleton instance of the settings class.

    Declaration
    public static TMP_Settings instance { get; }
    Property Value
    Type Description
    TMP_Settings

    leadingCharacters

    Text file that contains the leading characters used for line breaking for Asian languages.

    Declaration
    public static TextAsset leadingCharacters { get; }
    Property Value
    Type Description
    TextAsset

    linebreakingRules

    Declaration
    public static TMP_Settings.LineBreakingTable linebreakingRules { get; }
    Property Value
    Type Description
    TMP_Settings.LineBreakingTable

    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
    Type Description
    System.Boolean

    missingGlyphCharacter

    The character the will be used as a replacement for missing glyphs in a font asset.

    Declaration
    public static int missingGlyphCharacter { get; }
    Property Value
    Type Description
    System.Int32

    version

    Returns the release version of the product.

    Declaration
    public static string version { get; }
    Property Value
    Type Description
    System.String

    warningsDisabled

    Controls the display of warning message in the console.

    Declaration
    public static bool warningsDisabled { get; }
    Property Value
    Type Description
    System.Boolean

    Methods

    GetFontAsset()

    Returns the Font Asset defined in the TMP Settings file.

    Declaration
    public static TMP_FontAsset GetFontAsset()
    Returns
    Type Description
    TMP_FontAsset

    GetSettings()

    Returns the Sprite Asset defined in the TMP Settings file.

    Declaration
    public static TMP_Settings GetSettings()
    Returns
    Type Description
    TMP_Settings

    GetSpriteAsset()

    Returns the Sprite Asset defined in the TMP Settings file.

    Declaration
    public static TMP_SpriteAsset GetSpriteAsset()
    Returns
    Type Description
    TMP_SpriteAsset

    GetStyleSheet()

    Returns the Sprite Asset defined in the TMP Settings file.

    Declaration
    public static TMP_StyleSheet GetStyleSheet()
    Returns
    Type Description
    TMP_StyleSheet

    LoadDefaultSettings()

    Static Function to load the TMP Settings file.

    Declaration
    public static TMP_Settings LoadDefaultSettings()
    Returns
    Type Description
    TMP_Settings

    LoadLinebreakingRules()

    Declaration
    public static void LoadLinebreakingRules()
    Back to top
    Copyright © 2025 Unity Technologies
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 02 April 2025