hz-android-2d-porting
Guides porting existing Android 2D apps to Meta VR and Horizon OS — input adaptation, panel layout, and design requirements. Use…
Reviews Unity code targeting Meta VR and Horizon OS for performance issues, rendering best practices, and common VR pitfalls. Use during code review or when diagnosing Meta VR performance problems in Unity projects.
Claude Code
$ npx -y skills add meta-quest/agentic-tools --skill hz-unity-code-review --agent claude-code
Codex
$ npx skills add meta-quest/agentic-tools --skill hz-unity-code-review -a codex -y
Cursor
$ npx skills add meta-quest/agentic-tools --skill hz-unity-code-review -a cursor -y
Gemini CLI
$ npx skills add meta-quest/agentic-tools --skill hz-unity-code-review -a gemini-cli -y
GitHub Copilot
$ npx skills add meta-quest/agentic-tools --skill hz-unity-code-review -a github-copilot -y
OpenCode
$ npx skills add meta-quest/agentic-tools --skill hz-unity-code-review -a opencode -y
Windsurf
$ npx skills add meta-quest/agentic-tools --skill hz-unity-code-review -a windsurf -y
name: hz-unity-code-review license: Apache-2.0 description: Reviews Unity code targeting Meta VR and Horizon OS for performance issues, rendering best practices, and common VR pitfalls. Use during code review or when diagnosing Meta VR performance problems in Unity projects. allowed-tools: Bash(metavr:*), Bash(hzdb:*)
Use this skill when reviewing Unity C# code or project settings that target Meta VR headsets. This includes:
Meta VR applications must use the Universal Render Pipeline (URP) with specific settings optimized for mobile VR. The Built-in Render Pipeline is not recommended for new Meta VR projects.
Critical settings to verify:
Meta VR has draw call budgets that vary by workload complexity. Every draw call has CPU overhead that directly impacts frame timing.
| Metric | Quest 2 / Quest Pro | Quest 3 / Quest 3S | Meta VR Glasses | |--------|---------------------|---------------------|-----------------| | Draw calls (busy simulation) | 80-200 | 200-300 | 200-300 | | Draw calls (medium simulation) | 200-300 | 400-600 | 400-600 | | Draw calls (light simulation) | 400-600 | 700-1000 | 700-1000 | | Triangles per frame | 750K-1M | 1M-2M | 1M-2M | | SetPass calls | < 50 | < 80 | < 80 |
Enable and verify:
Mobile GPUs on Meta VR cannot handle desktop-class shaders. Review all materials for:
GC allocations cause frame hitches and must be eliminated from hot paths.
// BAD: Allocates every frame
void Update() {
string label = "Score: " + score.ToString();
var enemies = FindObjectsOfType<Enemy>();
var filtered = enemies.Where(e => e.IsAlive).ToList();
}
// GOOD: Zero allocations in Update
private StringBuilder _sb = new StringBuilder(32);
private List<Enemy> _enemyCache = new List<Enemy>();
private Enemy[] _enemyArray;
void Start() {
_enemyArray = FindObjectsOfType<Enemy>();
}
void Update() {
_sb.Clear();
_sb.Append("Score: ");
_sb.Append(score);
}Meta VR supports multiple input modalities. Code should handle:
Physics simulation is expensive on mobile. Review for:
Audio is often overlooked but can impact performance:
| Area | Target | Notes | |------|--------|-------| | Draw calls | 80-200 (busy) to 400-600 (light) | Use batching, instancing, atlasing | | Triangles | 750K-1M/frame | Use LODs, occlusion culling | | Texture resolution | Max 2K, 4K sparingly | ASTC compression required | | Shader | URP mobile shaders | No Standard shader, no screen-space effects | | Rendering mode | Single-pass multiview | Must be enabled in XR settings | | FFR | Enabled (High or HighTop) | Fixed foveated rendering reduces edge fragment cost | | MSAA | 4x quality / 2x perf | Free on tile-based GPU when configured correctly | | Target frame rate | 72 Hz minimum | 90 Hz recommended, 120 Hz for smooth experiences | | GC allocations | 0 B/frame in steady state | No allocations in Update/LateUpdate/FixedUpdate | | Audio sources | < 16 simultaneous | Use pooling for audio sources |
// Flag these patterns in code review:
Camera.main // Calls FindWithTag internally
GameObject.Find("name") // Linear search every call
GetComponent<T>() in Update // Cache the result
new List<T>() in Update // Allocates on heap
string + string in Update // Creates new string objects
foreach on non-List collections // Enumerator allocation
LINQ queries (.Where, .Select) // Multiple allocations
Boxing (int -> object) // Heap allocation
delegate/lambda in hot paths // Closure allocation// BAD: Empty Update still has overhead
void Update() { }
// BAD: Logic that doesn't need perGuides 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.