How to Setup TextMesh Pro
Use this guide for the one non-obvious project-specific step after
importing TextMesh Pro — everything else about the package is just the
standard Unity import. Based on the actual sprite setup used by these
projects' UI text (GameConstants.cs's inline icon tags) and the TMP
Settings asset created wherever TextMesh Pro gets imported.
Architecture Context
- UI text in these projects embeds inline icons via TMP's sprite tag
syntax, e.g.
<sprite="CoinIcon" index=0>(see the icon constants —CoinIcon,AdsIcon,ClockIcon, and similar — inGameConstants.cs). A named sprite tag like this resolves by asset name throughTMP_Settings, which looks it up under a configured Default Sprite Asset Path folder (e.g.Resources/<path>/CoinIcon). - TMP's own default import expects that folder to be named
Sprite Assets/. These projects' own icon sprite assets instead live under aResources/Sprites/folder — a different name than TMP assumes out of the box. - If the TMP Settings → Default Sprite Asset → Path field isn't
updated to match, TMP can't resolve any named sprite asset at the
expected location, and every inline
<sprite=...>tag in the UI silently fails to render its icon. - The project's own TMP plugin folder (wherever it lived during
development) is stripped before export — TMP isn't shipped as part of
the package. You're expected to import it yourself; the icon sprite
assets under
Resources/Sprites/do ship, since they live outside that folder.
Pre-Setup Checklist
- TextMesh Pro package imported (via Package Manager, or the Window → TextMeshPro → Import TMP Essential Resources prompt Unity shows the first time a TMP component is used).
Main Procedure
Step 1: Import TMP Essential Resources
If you haven't already, trigger the import via Window → TextMeshPro → Import TMP Essential Resources.
Step 2: Fix the Default Sprite Asset Path
Open Edit → Project Settings → TextMesh Pro → Settings (or locate and
select the TMP Settings.asset under wherever TextMesh Pro was imported),
find the Default Sprite Asset section, and change the Path field
from Sprite Assets/ to Sprites/.
Step 3: Validate
Run any scene showing UI text with a resource cost — coins, the ad-watch
prompt, tickets, a timer — and confirm the inline icon renders instead of
showing as missing/blank text where the <sprite=...> tag was.
Common Edit Recipes
Recipe A: Add a New Inline Icon
Add a new TMP sprite asset under the project's Resources/Sprites/
folder (matching the existing single-sprite-per-asset pattern), then
reference it the same way the existing icons are referenced — add a new
constant to GameConstants.cs following the <sprite="Name" index=0>
pattern rather than hardcoding the tag inline at each call site.
Troubleshooting
- Inline icons show as blank/missing in UI text. The Default Sprite
Asset Path in TMP Settings almost certainly still says
Sprite Assets/instead ofSprites/— this is the one step easy to miss after a fresh import, since Unity doesn't warn about it. - Icons worked before, broke after re-importing TMP. Re-importing TMP Essential Resources can reset TMP Settings to its defaults — re-apply Step 2.