assembly-definitions
Assembly definition management — when to create asmdefs, reference rules, Editor/Runtime/Test separation, platform filters, compilation speed optimization.
TextMeshPro text rendering — font asset creation, material presets, rich text tags, dynamic font fallback, sprite assets in text. Use for all text rendering in Unity.
$ npx -y skills add XeldarAlz/everything-claude-unity --skill textmeshpro --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/textmeshproContext preview
The summary Claude sees to decide when to auto-load this skill.
TextMeshPro text rendering — font asset creation, material presets, rich text tags, dynamic font fallback, sprite assets in text. Use for all text rendering in Unity.
name: textmeshpro description: "TextMeshPro text rendering — font asset creation, material presets, rich text tags, dynamic font fallback, sprite assets in text. Use for all text rendering in Unity." globs: ["**/TMP_*.cs", "**/TextMesh*.cs", "**/*Text*.cs", "**/*.asset"]
TextMeshPro (TMP) is Unity's standard text solution, replacing the legacy Text component. It uses Signed Distance Field (SDF) rendering for resolution-independent, crisp text with support for rich text, outlines, shadows, and inline sprites.
| Component | Use Case | Namespace | |-----------|----------|-----------| | `TextMeshProUGUI` | Canvas UI text (most common) | `TMPro` | | `TextMeshPro` | World-space 3D text (signs, name plates) | `TMPro` |
using TMPro; [SerializeField] private TextMeshProUGUI _uiText; // Canvas text [SerializeField] private TextMeshPro _worldText; // 3D world text
Font assets are created from TTF/OTF font files via the Font Asset Creator window.
1. **Window > TextMeshPro > Font Asset Creator** 2. Set **Source Font File** to your TTF/OTF font 3. Configure settings:
4. Click **Generate Font Atlas**, then **Save**
| Mode | Quality | Use Case | |------|---------|----------| | SDFAA | Best | Default for most fonts | | SDF | Good | Slightly faster rendering | | SDFAA_HINTED | Best + hinting | Small text sizes, pixel-perfect | | Raster | Bitmap | Pixel art fonts only |
Material presets add visual effects (outline, shadow, glow) without modifying the base font asset.
1. Select the font asset in Project window 2. In Inspector, click the material field to see the base material 3. Right-click the font asset > **Create > Material Preset** 4. Adjust properties on the new material:
[SerializeField] private Material _damageMaterial; // Red outline preset
[SerializeField] private Material _defaultMaterial;
public void ShowDamageText()
{
_uiText.fontSharedMaterial = _damageMaterial;
}
public void ResetTextAppearance()
{
_uiText.fontSharedMaterial = _defaultMaterial;
}**Important**: Use `fontSharedMaterial` (shared, no allocation) instead of `fontMaterial` (creates instance, allocates).
TMP supports extensive rich text markup within text strings.
<b>Bold text</b> <i>Italic text</i> <u>Underline</u> <s>Strikethrough</s> <mark=#FFFF0044>Highlighted</mark> <sup>Superscript</sup> <sub>Subscript</sub>
<color=#FF0000>Red</color> <color="red">Named red</color> <color=#FF000088>Semi-transparent red</color> <size=24>Larger text</size> <size=+10>Relative larger</size> <size=-4>Relative smaller</size>
<align="center">Centered text</align> <align="left">Left aligned</align> <align="right">Right aligned</align> <cspace=5>Character spacing</cspace> <line-height=150%>Taller lines</line-height> <indent=20>Indented text</indent> <margin=10>Text with margin</margin> <mspace=0.5em>Monospaced</mspace>
Coins: <sprite name="coin"> x 100 Health: <sprite name="heart" tint=1> <sprite index=0> (by index in sprite asset)
Click <link="store">here</link> to open the store. Visit <link="https://example.com">our site</link>.
<font="OtherFontAsset">Different font</font> <gradient="GradientPreset">Gradient text</gradient> <rotate=15>Rotated</rotate> <voffset=10>Vertical offset</voffset> <width=50%>Constrained width</width> <nobr>No line break here</nobr> <page>Page break (for multi-page)</page>
Chain font assets so missing characters fall through to other fonts. Essential for multi-language support.
1. Select your primary font asset 2. In Inspector, expand **Fallback Font Asset List** 3. Add fallback fonts in priority order:
TMP automatically searches fallback fonts when a glyph is not found in the primary font.
1. **Edit > Project Settings > TextMesh Pro > Settings** 2. Add fonts to **Fallback Font Assets** list 3. These apply to ALL TMP text components as a last resort
Embed icons, emojis, or custom images inline with text.
1. Create a sprite sheet texture (atlas of icons) 2. **Right-click texture > Create > TextMeshPro > Sprite Asset** 3. Define sprite regions in the Sprite Asset inspector 4. Name each sprite for easy reference
// In text strings _uiText.text = "Gold: <sprite name=\"coin\"> 500"; // With tinting (inherits text color) _uiText.text = "<sprite name=\"heart\" tint=1>";
[SerializeField] private TextMeshProUGUI _scoreText;
[SerializeField] private TextMeshProUGUI _timerText;
// GOOD — SetText with format args avoids string allocation
_scoreText.SetText("Score: {0}", score);
_timerText.SetText("{0}:{1:00}", minutes, seconds);
// GOOD — SetText with float formatting
_scoreText.SetText("DPS: {0:2}The ultimate Claude Code toolkit for Unity game development. A production-ready, plug-and-play system that gives Claude Code deep Unity expertise — from writing performant C# to building scenes, profiling performance, and triggering iOS/Android builds — all
Assembly definition management — when to create asmdefs, reference rules, Editor/Runtime/Test separation, platform filters, compilation speed optimization.
Structured commit trailers — adds Constraint, Rejected, Scope-risk, and Not-tested metadata to commit messages. Captures architectural decisions and known gaps…
Ambiguity gating — detects vague feature requests and forces structured requirements gathering with scoring across scope, platform, performance, integration,…
Event system patterns — C# events, UnityEvent, SO event channels, static EventBus. When to use each, zero-allocation patterns, memory leak prevention.
Configures Claude Code's statusline to display Unity workflow state — current phase, active agent, files modified, and session duration.
Post-debugging knowledge extraction — captures non-obvious, codebase-specific learnings that pass quality gates. Invoke after resolving tricky bugs or…