Class TextMeshProSetup
- Namespace
- TDMaker.Editor
- Assembly
- TDMaker.Editor.dll
TextMesh Pro setup check. The HUD, damage numbers and sample menus use TextMesh Pro (part of the uGUI package in
Unity 6), which needs its "Essential Resources" (default font asset, shaders, settings) imported into the project once.
2D Tower Defense Maker does not ship those resources. When they are missing this class logs one clear message per editor session,
offers a one-click import in a dialog, and is available as Tools > 2D Tower Defense Maker > Import TMP Essential Resources
(also used by the Validator).
[InitializeOnLoad]
public static class TextMeshProSetup
- Inheritance
-
TextMeshProSetup
- Inherited Members
Fields
MissingMessage
Message logged (and shown) when the essentials are missing.
public const string MissingMessage = "[2D Tower Defense Maker] TextMesh Pro Essential Resources are not imported, so HUD and menu text cannot render. Import them with Tools > 2D Tower Defense Maker > Import TMP Essential Resources (or Window > TextMeshPro > Import TMP Essential Resources)."
Field Value
SettingsPath
Where TextMesh Pro keeps its settings once the essentials are imported.
public const string SettingsPath = "Assets/TextMesh Pro/Resources/TMP Settings.asset"
Field Value
Properties
EssentialsImported
Whether the TextMesh Pro Essential Resources are present (a TMP Settings asset exists, at the default location or in any Resources folder).
public static bool EssentialsImported { get; }
Property Value
Methods
ImportEssentials()
Imports the TextMesh Pro Essential Resources silently. The import finishes asynchronously; in batch mode
(-batchmode -executeMethod TDMaker.Editor.TextMeshProSetup.ImportEssentials, without -quit)
the editor exits by itself when it is done (exit code 1 on failure).
[MenuItem("Tools/2D Tower Defense Maker/Import TMP Essential Resources", priority = 902)]
public static void ImportEssentials()