Reimport upgraded TextMesh Pro, modified.

This commit is contained in:
2023-02-01 22:14:43 +08:00
parent 623c53f79a
commit bd256ba1a6
293 changed files with 98622 additions and 345 deletions

View File

@@ -0,0 +1,42 @@
using UnityEngine;
using UnityEngine.TextCore.Text;
using UnityEditor;
using UnityEditor.TextCore.Text;
namespace TMPro.EditorUtilities
{
public class TMPro_FontAssetCreatorWindow : EditorWindow
{
private static FontAssetCreatorWindow m_Window;
[MenuItem("Window/TextMeshPro/Font Asset Creator", false, 2025)]
public static void ShowFontAtlasCreatorWindow()
{
m_Window = GetWindow<FontAssetCreatorWindow>();
m_Window.titleContent = new GUIContent("Font Asset Creator");
m_Window.Focus();
// Make sure TMP Essential Resources have been imported.
CheckEssentialResources();
}
// Make sure TMP Essential Resources have been imported.
static void CheckEssentialResources()
{
if (TMP_Settings.instance == null)
{
m_Window.Close();
TextEventManager.RESOURCE_LOAD_EVENT.Add(ON_RESOURCES_LOADED);
}
}
// Event received when TMP resources have been loaded.
static void ON_RESOURCES_LOADED()
{
TextEventManager.RESOURCE_LOAD_EVENT.Remove(ON_RESOURCES_LOADED);
ShowFontAtlasCreatorWindow();
}
}
}