skills/hz-unity-tmp-resources/SKILL.md
Imports and configures TextMesh Pro Essential Resources for Unity projects targeting Meta Quest and Horizon OS. Use when setting up TMP UI, fixing missing TMP materials or fonts, or resolving pink/magenta TMP text.
npx skillsauth add meta-quest/agentic-tools hz-unity-tmp-resourcesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill automatically when any of the following are detected:
LiberationSans SDF, TMP Settings, or missing TMP materialsAssets/TextMesh Pro/Resources/ folder does not existBefore importing, check whether resources already exist using Unity_RunCommand:
using UnityEngine;
using UnityEditor;
using System.IO;
internal class CommandScript : IRunCommand
{
public void Execute(ExecutionResult result)
{
string resourcesPath = Path.Combine(Application.dataPath, "TextMesh Pro", "Resources");
bool imported = Directory.Exists(resourcesPath);
if (imported)
{
string fontPath = "Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset";
var font = AssetDatabase.LoadAssetAtPath<Object>(fontPath);
result.Log("TMP Essential Resources: ALREADY IMPORTED. Default font present: {0}", font != null);
}
else
{
result.Log("TMP Essential Resources: NOT IMPORTED. Resources folder missing at {0}", resourcesPath);
}
}
}
If already imported, stop here — no action needed.
IMPORTANT: The TMP import process opens a Unity dialog that requires manual user interaction. This cannot be fully automated via MCP.
Use Unity_RunCommand to trigger the import dialog:
using UnityEngine;
using UnityEditor;
internal class CommandScript : IRunCommand
{
public void Execute(ExecutionResult result)
{
EditorApplication.ExecuteMenuItem("Window/TextMeshPro/Import TMP Essential Resources");
result.Log("TMP Essential Resources import dialog opened. User must click Import in the Unity Editor.");
}
}
After executing, you MUST:
After the user confirms, verify with Unity_RunCommand:
using UnityEngine;
using UnityEditor;
using System.IO;
internal class CommandScript : IRunCommand
{
public void Execute(ExecutionResult result)
{
string resourcesPath = Path.Combine(Application.dataPath, "TextMesh Pro", "Resources");
if (!Directory.Exists(resourcesPath))
{
result.LogError("Import failed: Resources folder not found at " + resourcesPath);
return;
}
string fontPath = "Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset";
var font = AssetDatabase.LoadAssetAtPath<Object>(fontPath);
if (font == null)
{
result.LogError("Import incomplete: Default font asset not found at " + fontPath);
return;
}
var settingsGuids = AssetDatabase.FindAssets("t:TMP_Settings");
if (settingsGuids.Length == 0)
{
result.LogError("Import incomplete: TMP_Settings asset not found.");
return;
}
result.Log("TMP Essential Resources verified: folder exists, default font present, TMP_Settings found.");
}
}
If text still appears pink after importing resources, force a shader recompilation via Unity_RunCommand:
using UnityEngine;
using UnityEditor;
internal class CommandScript : IRunCommand
{
public void Execute(ExecutionResult result)
{
var shaderGuids = AssetDatabase.FindAssets("t:Shader TextMeshPro");
int reimported = 0;
foreach (var guid in shaderGuids)
{
string path = AssetDatabase.GUIDToAssetPath(guid);
AssetDatabase.ImportAsset(path, ImportAssetOptions.ForceUpdate);
reimported++;
}
result.Log("Reimported {0} TMP shaders.", reimported);
}
}
If Window/TextMeshPro/Import TMP Essential Resources is not available:
Unity_RunCommand:using UnityEngine;
using UnityEditor;
using UnityEditor.PackageManager;
internal class CommandScript : IRunCommand
{
public void Execute(ExecutionResult result)
{
var request = Client.Add("com.unity.textmeshpro");
// Busy-wait is required here because Unity_RunCommand scripts run synchronously.
// This will briefly block the editor (typically < 5 seconds).
while (!request.IsCompleted) { }
if (request.Status == StatusCode.Success)
result.Log("TextMesh Pro package installed: {0}", request.Result.version);
else
result.LogError("Failed to install TMP: " + request.Error.message);
}
}
This skill handles importing TMP resources. For VR-specific UI configuration (canvas setup, text sizing, viewing distances), use the meta-quest-ui skill after TMP resources are imported.
development
Build and sideload Android apps for Meta Portal devices (Portal, Portal+, Portal Mini, Portal Go, Portal TV) using hzdb. Use when targeting Portal hardware — covers ADB enablement, the no-GMS constraint, manifest/launcher intent-filter requirements, icon density quirks (PNG-only, mipmap-xxxhdpi), the Smart Camera SDK, and the gradle + `hzdb adb` build/deploy/debug loop. Auto-load when the user mentions "Portal" device, targets `minSdkVersion` 28-29 for a tabletop/TV form factor, or works with the `com.facebook.portal` package.
tools
Provides the complete hzdb (Horizon Debug Bridge) CLI reference for Meta Quest and Horizon OS development — installation, device setup, command discovery, MCP server mode, documentation search, app deployment, device testing setup, audio control, screenshots, and performance analysis. Use when the user needs to install hzdb, asks what commands are available, needs CLI syntax help, or wants to know what hzdb can do.
development
Sets up the Meta XR Simulator for testing Meta Quest and Horizon OS apps without a physical device. Use when configuring device-free testing for Unity or Unreal projects.
development
Validates Meta Quest and Horizon OS apps against VRC (Virtual Reality Check) store publishing requirements. Use when preparing a build for Quest Store submission or running pre-submission compliance checks.