docs.unity3d.com
    Show / Hide Table of Contents

    Class TMP_EditorUtility

    Inheritance
    Object
    TMP_EditorUtility
    Namespace: TMPro.EditorUtilities
    Syntax
    public static class TMP_EditorUtility

    Properties

    packageFullPath

    Returns the fully qualified path of the package.

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

    packageRelativePath

    Returns the relative path of the package.

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

    Methods

    CreateAsset<T>(String)

    Create and return a new asset in a smart location based on the current selection and then select it.

    Declaration
    public static T CreateAsset<T>(string name)
        where T : ScriptableObject
    Parameters
    Type Name Description
    String name

    Name of the new asset. Do not include the .asset extension.

    Returns
    Type Description
    T

    The new asset.

    Type Parameters
    Name Description
    T

    DrawBox(Rect, Single, Color)

    Declaration
    public static void DrawBox(Rect rect, float thickness, Color color)
    Parameters
    Type Name Description
    Rect rect
    Single thickness
    Color color

    DrawColorProperty(Rect, SerializedProperty)

    Declaration
    public static void DrawColorProperty(Rect rect, SerializedProperty property)
    Parameters
    Type Name Description
    Rect rect
    SerializedProperty property

    EditorToggle(Rect, Boolean, GUIContent, GUIStyle)

    Declaration
    public static bool EditorToggle(Rect position, bool value, GUIContent content, GUIStyle style)
    Parameters
    Type Name Description
    Rect position
    Boolean value
    GUIContent content
    GUIStyle style
    Returns
    Type Description
    Boolean

    FindMatchingFontAsset(Material)

    Declaration
    public static TMP_FontAsset FindMatchingFontAsset(Material mat)
    Parameters
    Type Name Description
    Material mat
    Returns
    Type Description
    TMP_FontAsset

    FindMaterialReferences(TMP_FontAsset)

    Declaration
    public static Material[] FindMaterialReferences(TMP_FontAsset fontAsset)
    Parameters
    Type Name Description
    TMP_FontAsset fontAsset
    Returns
    Type Description
    Material[]

    GetDecimalCharacterSequence(Int32[])

    Function which returns a string containing a sequence of Decimal character ranges.

    Declaration
    public static string GetDecimalCharacterSequence(int[] characterSet)
    Parameters
    Type Name Description
    Int32[] characterSet
    Returns
    Type Description
    String

    GetHorizontalAlignmentGridValue(Int32)

    Function to return the horizontal alignment grid value.

    Declaration
    public static int GetHorizontalAlignmentGridValue(int value)
    Parameters
    Type Name Description
    Int32 value
    Returns
    Type Description
    Int32

    GetUnicodeCharacterSequence(Int32[])

    Function which returns a string containing a sequence of Unicode (Hex) character ranges.

    Declaration
    public static string GetUnicodeCharacterSequence(int[] characterSet)
    Parameters
    Type Name Description
    Int32[] characterSet
    Returns
    Type Description
    String

    GetVerticalAlignmentGridValue(Int32)

    Function to return the vertical alignment grid value.

    Declaration
    public static int GetVerticalAlignmentGridValue(int value)
    Parameters
    Type Name Description
    Int32 value
    Returns
    Type Description
    Int32

    RepaintAll()

    Declaration
    public static void RepaintAll()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • 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 18 October 2023