hz-android-2d-porting
Guides porting existing Android 2D apps to Meta VR and Horizon OS — input adaptation, panel layout, and design requirements. Use…
Set up and tweak Meta Movement SDK (MSDK) retargeting for a character model. Use this whenever the user wants to retarget a humanoid FBX/prefab for Meta VR body tracking, generate a retargeting config, or hand-edit the resulting `<asset>.json` (fix known-joint mappings, exclude
Claude Code
$ npx -y skills add meta-quest/agentic-tools --skill hz-unity-meta-movement-sdk-retargeting --agent claude-code
Codex
$ npx skills add meta-quest/agentic-tools --skill hz-unity-meta-movement-sdk-retargeting -a codex -y
Cursor
$ npx skills add meta-quest/agentic-tools --skill hz-unity-meta-movement-sdk-retargeting -a cursor -y
Gemini CLI
$ npx skills add meta-quest/agentic-tools --skill hz-unity-meta-movement-sdk-retargeting -a gemini-cli -y
GitHub Copilot
$ npx skills add meta-quest/agentic-tools --skill hz-unity-meta-movement-sdk-retargeting -a github-copilot -y
OpenCode
$ npx skills add meta-quest/agentic-tools --skill hz-unity-meta-movement-sdk-retargeting -a opencode -y
Windsurf
$ npx skills add meta-quest/agentic-tools --skill hz-unity-meta-movement-sdk-retargeting -a windsurf -y
name: hz-unity-meta-movement-sdk-retargeting license: Apache-2.0 description: Set up and tweak Meta Movement SDK (MSDK) retargeting for a character model. Use this whenever the user wants to retarget a humanoid FBX/prefab for Meta VR body tracking, generate a retargeting config, or hand-edit the resulting `<asset>.json` (fix known-joint mappings, exclude joints from auto-mapping, rename target joints, adjust per-joint mapping weights, change a mapping behavior to twist/childAlignedTwist, edit T-pose values). The headless entry point is `Meta.XR.Movement.Editor.MSDKUtilityEditor.RunDefaultRetargetingSetup(GameObject asset)` — call it against a live Editor with unity-cli first, then hand-edit if needed. **Skip** if the user is editing runtime retargeting code, the source `OVRSkeletonData.json`, or non-MSDK files.
Don't hand-craft the JSON from scratch — the native side computes initial alignment, mappings, and T-pose data that would be tedious to write by hand. The right flow is:
1. **Generate the default config** by calling `Meta.XR.Movement.Editor.MSDKUtilityEditor.RunDefaultRetargetingSetup(GameObject asset, string customDataSourcePath = null)` against a live Editor with `unity-cli`. This is the headless equivalent of clicking through the Retargeting Configuration Editor UI with all defaults (Next×3 → Validate → Done) and produces both artifacts:
2. **Inspect the generated JSON** to verify joint mappings look right. 3. **Hand-edit only if needed** — the rest of this skill describes the JSON structure and the common tweaks.
The same `RunDefaultRetargetingSetup` API also backs the `Assets/Movement SDK/Body Tracking/Run Default Retargeting Setup` editor menu item, so a user who sees a project asset selected can trigger it from the menu too.
`run_script` compiles against every loaded assembly, so the `Meta.*` Editor namespace is directly referenceable — call the method normally, no reflection:
// AgentScripts/RunRetargetingSetup.cs
using Meta.XR.Movement.Editor;
using UnityEditor;
using UnityEngine;
public static class RunRetargetingSetup
{
public static string Run(string assetPath)
{
var asset = AssetDatabase.LoadAssetAtPath<GameObject>(assetPath);
if (asset == null) return $"ERROR: asset not found at {assetPath}";
MSDKUtilityEditor.RunDefaultRetargetingSetup(asset, null);
var jsonPath = System.IO.Path.ChangeExtension(assetPath, ".json");
return $"done; config at {jsonPath} (exists: {System.IO.File.Exists(jsonPath)})";
}
}unity status --format json # look for state "ready" unity command run_script --file AgentScripts/RunRetargetingSetup.cs \ --entry RunRetargetingSetup.Run --args '["Assets/MyChar/MyChar.fbx"]' --format json
Keep the `.cs` outside `Assets/` (the path is relative to the project root) so writing it triggers no import or domain reload. See the **`unity-cli`** skill for connecting and `--project-path`; the reflection-based MCP version is in [references/unity-mcp-fallback.md](references/unity-mcp-fallback.md).
Notes:
The defaults are usually 80–95% right. Common reasons to hand-edit afterwards:
The JSON drives runtime retargeting. The same skeleton-name strings appear across many sections — **edit them all consistently** or the native loader will silently produce broken mappings.
{
"name": "<character name>",
"config": { version, coordinateSpace }
"source": { format, joints, manifestations, autoMappingJointData, knownJoints, hierarchy, tposeMin, tposeMax, tpose }
"target": { format, joints, knownJoints, hierarchy, tposeMin, tposeMax, tpose }
"mapping": { min: { <targetJoint>: <mappingEntry> }, max: { ... } }
}A joint name (e.g. `"Right_UpperArm"`) referenced inconsistently across sections will break
Guides porting existing Android 2D apps to Meta VR and Horizon OS — input adaptation, panel layout, and design requirements. Use…
Upgrades Meta VR apps to newer Horizon OS SDK versions — migration guides, deprecated API replacements, changelog. Use when…
Guides design of comfortable, intuitive VR/MR experiences for Meta VR and Horizon OS — comfort guidelines, interaction patterns,…
Builds WebXR experiences for Meta VR and Horizon OS using the Immersive Web SDK (IWSDK) — ECS architecture, Three.js integration,…
Build multi-window Meta Horizon OS experiences with the MetaVrx Layout SDK in Jetpack Compose or React Native. Covers framework…
Builds app UI for Meta VR and Horizon OS with the MetaVrx UI Set, a Jetpack Compose component library and design system. Covers…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.