optimize-text-mesh-pro — Claude Code skill for TextMeshPro tuning
Walks through TextMeshPro problems in Unity: bloated atlases, fuzzy glyphs, CPU spikes on text updates, build size.
npx skills add Unity-Technologies/skills --skill optimize-text-mesh-pro -a claude-codeWhat optimize-text-mesh-pro does
The skill is a triage guide. It asks which symptom you have — memory or atlas bloat, visual quality, CPU load, build size, or alignment in mixed-language text — then points to the matching section: font stacks and dynamic fallbacks, padding against sampling point size, font asset scale, SDF16 atlas mode, AutoSize, worldspace text, font normalization, material presets.
The rules are concrete. Keep the main font static with its glyphs baked, and add dynamic fallbacks through the Fallback list. Any dynamic fallback needs Clear Dynamic Data On Build turned on, or glyphs baked while you test in the editor end up in the player. Padding divided by sampling point size has to match across the main font and its fallbacks, since a mismatch shows up as uneven stroke weight on one line. Set font asset Scale to 1 — a value like 0.9 throws off point-size math.
Normalizing mixed Latin and CJK text runs through importing TMP Example & Extras, adding TMP_TextInfoDebugTool to the object, and turning on ShowLines to see where baseline drifts. On some project layouts that import loops forever; restarting Unity clears it on the second try. If you ship multilingual builds for iOS and Android, the skill suggests evaluating Atlas Population Mode = Dynamic OS from TMP 3.2.0-pre.3, where the source font stays out of the player and Unity looks for a matching one on the device.
What it helps with
- find out why several large TMP atlases show up in the Memory Profiler
- fix fuzzy edges and uneven glyph weight on a single line
- stop CPU spikes on timers and counters caused by AutoSize
- shrink build size from shipped font files
- align Latin and CJK text on the same line
Example prompts for the agent
- TMP atlases are huge in the Memory Profiler — what should I check first?
- Latin and Chinese text sit on one line and the baselines drift apart. How do I align them?
- My on-screen timer causes CPU spikes. Should I turn AutoSize off?
How to install optimize-text-mesh-pro
1Skills CLI (Vercel)
npx skills add Unity-Technologies/skills --skill optimize-text-mesh-pro -a claude-code2Manually: put the files in place
~/.claude/skills/optimize-text-mesh-pro/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/optimize-text-mesh-pro/
1Skills CLI (Vercel)
npx skills add Unity-Technologies/skills --skill optimize-text-mesh-pro -a codex2Manually: put the files in place
.agents/skills/optimize-text-mesh-pro/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Unity-Technologies/skills --skill optimize-text-mesh-pro -a cursor2Manually: put the files in place
.cursor/skills/optimize-text-mesh-pro/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Unity-Technologies/skills optimize-text-mesh-pro2Manually: put the files in place
.github/skills/optimize-text-mesh-pro/SKILL.md1Skills CLI (Vercel)
npx skills add Unity-Technologies/skills --skill optimize-text-mesh-pro -a gemini-cli2Platform CLI
gemini skills install https://github.com/Unity-Technologies/skills --path skills/optimize-text-mesh-proManually: put the files in place
.devin/skills/optimize-text-mesh-pro/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Unity-Technologies/skills --skill optimize-text-mesh-pro -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about optimize-text-mesh-pro
How do I install optimize-text-mesh-pro in Claude Code?
Run npx skills add Unity-Technologies/skills --skill optimize-text-mesh-pro -a claude-code. The skill file lands at ~/.claude/skills/optimize-text-mesh-pro/SKILL.md.
What does optimize-text-mesh-pro do?
It sorts TextMeshPro issues in Unity by symptom and gives rules for font stacks with dynamic fallbacks, padding against sampling point size, asset scale, atlas mode, AutoSize and material presets.
How does it help with multilingual builds?
For iOS and Android it suggests evaluating Atlas Population Mode = Dynamic OS from TMP 3.2.0-pre.3: the source font stays out of the build, and Unity searches the device for a font with matching Family and Style.