docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class TMP_Settings

    Scaling options for the sprites

    Inheritance
    object
    Object
    ScriptableObject
    TMP_Settings
    Inherited Members
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, 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, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: TMPro
    Assembly: Unity.TextMeshPro.dll
    Syntax
    [Serializable]
    [ExcludeFromPreset]
    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
    bool

    clearDynamicDataOnBuild

    Determines if the "Clear Dynamic Data on Build" property will be set to true or false on newly created dynamic font assets.

    Declaration
    public static bool clearDynamicDataOnBuild { get; }
    Property Value
    Type Description
    bool

    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
    string

    defaultFontAsset

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

    Declaration
    public static TMP_FontAsset defaultFontAsset { get; set; }
    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
    string

    defaultFontSize

    The Default Point Size of newly created text objects.

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

    defaultSpriteAsset

    The Default Sprite Asset to be used by default.

    Declaration
    public static TMP_SpriteAsset defaultSpriteAsset { get; set; }
    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
    string

    defaultStyleSheet

    The Default Style Sheet used by the text objects.

    Declaration
    public static TMP_StyleSheet defaultStyleSheet { get; set; }
    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
    float

    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
    float

    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

    emojiFallbackTextAssets

    list of Fallback Text Assets (Font Assets and Sprite Assets) used to lookup characters defined in the Unicode as Emojis.

    Declaration
    public static List<TMP_Asset> emojiFallbackTextAssets { get; set; }
    Property Value
    Type Description
    List<TMP_Asset>

    enableEmojiSupport

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

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

    enableExtraPadding

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

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

    enableKerning

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

    Declaration
    [Obsolete("The \"enableKerning\" property has been deprecated. Use the \"fontFeatures\" property to control what features are enabled by default on newly created text components.")]
    public static bool enableKerning { get; }
    Property Value
    Type Description
    bool

    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
    bool

    enableRaycastTarget

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

    Declaration
    public static bool enableRaycastTarget { get; }
    Property Value
    Type Description
    bool

    enableTintAllSprites

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

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

    fallbackFontAssets

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

    Declaration
    public static List<TMP_FontAsset> fallbackFontAssets { get; set; }
    Property Value
    Type Description
    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

    fontFeatures

    Controls which font features are enabled by default on newly created text objects.

    Declaration
    public static List<OTL_FeatureTag> fontFeatures { get; }
    Property Value
    Type Description
    List<OTL_FeatureTag>

    getFontFeaturesAtRuntime

    Determines if OpenType Font Features should be retrieved at runtime from the source font file.

    Declaration
    public static bool getFontFeaturesAtRuntime { get; }
    Property Value
    Type Description
    bool

    hideSubTextObjects

    Determines if sub text objects will be hidden in the scene hierarchy.

    Declaration
    public static bool hideSubTextObjects { get; }
    Property Value
    Type Description
    bool

    instance

    Get a singleton instance of the settings class.

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

    isTextObjectScaleStatic

    Disables InternalUpdate() calls when true. This can improve performance when the scale of the text object is static.

    Declaration
    public static bool isTextObjectScaleStatic { get; set; }
    Property Value
    Type Description
    bool

    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
    bool

    missingCharacterSpriteUnicode

    The unicode value of the sprite that will be used when the requested sprite is missing from the sprite asset and potential fallbacks.

    Declaration
    public static uint missingCharacterSpriteUnicode { get; set; }
    Property Value
    Type Description
    uint

    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
    Type Description
    int

    styleSheetsResourcePath

    The relative path to a Resources folder in the project that contains the TMP Style Sheets.

    Declaration
    public static string styleSheetsResourcePath { get; }
    Property Value
    Type Description
    string

    textWrappingMode

    Controls the text wrapping mode of newly created text objects.

    Declaration
    public static TextWrappingModes textWrappingMode { get; }
    Property Value
    Type Description
    TextWrappingModes

    useModernHangulLineBreakingRules

    Determines if Modern or Traditional line breaking rules should be used for Korean text.

    Declaration
    public static bool useModernHangulLineBreakingRules { get; set; }
    Property Value
    Type Description
    bool

    version

    Returns the release version of the product.

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

    warningsDisabled

    Controls the display of warning message in the console.

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

    Methods

    DelayShowPackageImporterWindow()

    Declaration
    public static void DelayShowPackageImporterWindow()

    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 Style Sheet 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()
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)