diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2020-04-19 17:19:32 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2020-04-19 17:19:32 -0400 |
| commit | c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78 (patch) | |
| tree | ee4d51c7c1d633e11f46453ef1edd3c77c4ef9f7 /Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ProjectTextSettings.cs | |
| download | Project-Sandbox-c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78.tar.gz Project-Sandbox-c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78.tar.bz2 Project-Sandbox-c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78.zip | |
Inital commit
Diffstat (limited to 'Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ProjectTextSettings.cs')
| -rw-r--r-- | Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ProjectTextSettings.cs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ProjectTextSettings.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ProjectTextSettings.cs new file mode 100644 index 0000000..8a3258b --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ProjectTextSettings.cs @@ -0,0 +1,43 @@ +#if !UNITY_2018_3_OR_NEWER
+using UnityEditor;
+
+namespace TMPro
+{
+
+ public static class TMP_ProjectTextSettings
+ {
+ // Open Project Text Settings
+ [MenuItem("Edit/Project Settings/TextMeshPro Settings", false, 309)]
+ public static void SelectProjectTextSettings()
+ {
+ TMP_Settings textSettings = TMP_Settings.instance;
+
+ if (textSettings)
+ {
+ Selection.activeObject = textSettings;
+
+ // TODO: Do we want to ping the Project Text Settings asset in the Project Inspector
+ EditorUtility.FocusProjectWindow();
+ EditorGUIUtility.PingObject(textSettings);
+ }
+ else
+ TMPro_EventManager.RESOURCE_LOAD_EVENT.Add(ON_RESOURCES_LOADED);
+ }
+
+
+ // Event received when TMP resources have been loaded.
+ static void ON_RESOURCES_LOADED()
+ {
+ TMPro_EventManager.RESOURCE_LOAD_EVENT.Remove(ON_RESOURCES_LOADED);
+
+ TMP_Settings textSettings = TMP_Settings.instance;
+
+ Selection.activeObject = textSettings;
+
+ // TODO: Do we want to ping the Project Text Settings asset in the Project Inspector
+ EditorUtility.FocusProjectWindow();
+ EditorGUIUtility.PingObject(textSettings);
+ }
+ }
+}
+#endif
\ No newline at end of file |
