计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
hz-unity-device-readiness【效率与协作】Audits a Unity project for Meta VR Glasses readiness across input and field of view — finds controller-dependent interactions such as OVRInput usage, recommends hand-tracking and ISDK controller-to-hands migrations, produces a prioritized migration plan, and detects head-locked UI that a narrower FoV would clip.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
This skill prepares a Unity project for Meta VR Glasses device requirements across two dimensions: input (hand tracking as the primary input, not a fallback) and field of view (a device with a narrower FoV than current Quest headsets). The input workflow is immediately below; the field-of-view workflow is its own section further down.
The target device treats hand tracking as the primary input method, not a fallback. Most existing Quest projects were built controller-first, so the work isn't just "replace button presses with gestures" — it's rethinking interaction design so hands feel natural instead of like a worse controller. A systematic scan matters: find every controller dependency, understand the gameplay intent behind it, and map it to the right ISDK pattern.
When a Meta VR Glasses or Meta Quest device is connected, ground the audit in real device data first — metavr device list shows what's attached, and metavr device info <id> reports the device's input and display capabilities the audit should target.
Build a complete picture of how the project handles input today. Controller dependencies hide in surprising places — not just obvious OVRInput.Get() calls, but also XR Interaction Toolkit components, Unity's legacy Input system, and custom grab systems. Cast a wide net:
# Find controller input usage
grep -r "OVRInput\.\(Get\|GetDown\|GetUp\)" --include="*.cs" .
grep -r "OVRInput\.Button\|OVRInput\.Axis" --include="*.cs" .
# Find XR Interaction Toolkit usage
grep -r "XRGrabInteractable\|XRRayInteractor\|XRDirectInteractor" --include="*.cs" .
# Find legacy Input system usage
grep -r "Input\.GetButton\|Input\.GetAxis\|Input\.GetKey" --include="*.cs" .
# Find interaction patterns
grep -r "Grabbable\|IGrabbable\|OnGrab\|OnRelease" --include="*.cs" .
grep -r "Raycast\|RaycastHit\|Physics\.Raycast" --include="*.cs" .
For each finding, categorize it:
| Category | What to Look For | Impact |
|---|---|---|
| Controller Input | OVRInput.Get(), button/axis references | Must replace with hand gestures or ISDK components |
| Grab Systems | Trigger-based grab, distance grab | Convert to HandGrabInteractable with pinch detection |
| UI Interaction | Ray-based UI, pointer clicks | Convert to poke interactions (PokeInteractable) |
| Movement | Thumbstick locomotion, snap turn | Redesign for hand-based or gaze-based navigation |
| Object Manipulation | Thumbstick rotation, button-based scaling | Use direct hand rotation/scaling with two-hand support |
For each controller-dependent system, suggest a specific ISDK-based replacement. Reference the hand-tracking patterns in references/hand-tracking-patterns.md for implementation details.
Rank suggestions by impact and effort:
Important. If the project already uses ISDK hand tracking (HandGrabInteractable, PokeInteractable, etc.) and has no controller-dependent code, report that it is already hand-ready. Surface enhancements only as Low-priority items — don't treat them as required changes. A project that already works with hands should not receive a long list of improvement suggestions.
Provide your analysis as a structured report:
hand-tracking-patterns.md),For detailed implementation patterns, read:
references/hand-tracking-patterns.md — 7 ISDK interaction patterns with component references.references/migration-guide.md — step-by-step controller-to-hands migration checklist.Run this when preparing the project for a device with a narrower field of view than the developer's current target. It finds head-locked (HUD) UI that fits a wider FoV but would be clipped at the edges of the narrower device — reticles, health/ammo counters, minimaps, tutorial pins, vignette/letterbox overlays — and reports each with a migration fix. This is a distinct pass from the input workflow above.
In VR nothing is permanently off-screen — the user can turn their head. The genuinely-clipped case is head-locked content: UI attached to the camera at a fixed angular offset. If that offset fit the wider FoV but exceeds the narrower device's frustum, it is clipped every frame and can never be brought into view. That is the only class this pass claims to find completely.
Compute the geometry; never estimate it. Do not read scene/prefab YAML and do trigonometry on nested transforms in your head. Get resolved transforms from the running project — enter Play mode (or a build) and read the live objects — then apply the deterministic frustum test below. The math decides; you classify and suggest.
To reach the game's HUD states and automate this instead of clicking through by hand, drive the running build with Meta XR Operator — it can play the project and exercise gameplay states for you, then you inspect the resolved objects at each state. If you can't run and inspect the project live, this pass isn't reliable from static files alone — say so rather than guessing.
The frustum test needs both view frusta as tangent half-angles:
{ leftTan, rightTan, upTan, downTan } — target (narrower) device{ leftTan, rightTan, upTan, downTan } — current device (for the "fit before, not now" delta)Use the target device's published FoV spec for these values. If you don't have both sets, skip the FoV pass and say so — never guess numbers you don't have.
Canvas with renderMode ScreenSpaceOverlay/ScreenSpaceCamera; any Canvas/RectTransform/Renderer whose transform ancestry passes through the tracked camera / CenterEyeAnchor / OVRCameraRig center eye; full-screen vignette/letterbox overlays. Exclude world-locked content not parented to the head.z > 0): tanX = x/z, tanY = y/z; a corner is inside a device when -leftTan <= tanX <= rightTan and -downTan <= tanY <= upTan. Bleed = at least one corner inside the current device but outside the target device.