A game about forced loneliness, made by TACStudios
at master 1.3 kB view raw
1#if !UNITY_2018_3_OR_NEWER 2using UnityEditor; 3 4namespace TMPro 5{ 6 7 public static class TMP_ProjectTextSettings 8 { 9 // Open Project Text Settings 10 [MenuItem("Edit/Project Settings/TextMeshPro Settings", false, 309)] 11 public static void SelectProjectTextSettings() 12 { 13 TMP_Settings textSettings = TMP_Settings.instance; 14 15 if (textSettings) 16 { 17 Selection.activeObject = textSettings; 18 19 // TODO: Do we want to ping the Project Text Settings asset in the Project Inspector 20 EditorUtility.FocusProjectWindow(); 21 EditorGUIUtility.PingObject(textSettings); 22 } 23 else 24 TMPro_EventManager.RESOURCE_LOAD_EVENT.Add(ON_RESOURCES_LOADED); 25 } 26 27 28 // Event received when TMP resources have been loaded. 29 static void ON_RESOURCES_LOADED() 30 { 31 TMPro_EventManager.RESOURCE_LOAD_EVENT.Remove(ON_RESOURCES_LOADED); 32 33 TMP_Settings textSettings = TMP_Settings.instance; 34 35 Selection.activeObject = textSettings; 36 37 // TODO: Do we want to ping the Project Text Settings asset in the Project Inspector 38 EditorUtility.FocusProjectWindow(); 39 EditorGUIUtility.PingObject(textSettings); 40 } 41 } 42} 43#endif