My Unity editor version: 2021.3.5f1
To enable hand tracking using Oculus integration
- Go to Window > Package Manager > Packages: In Project
make sure Oculus XR Plugin is imported and up to date.
view example 1
- Go to Edit > Project Settings > XR Plug-in Management > Windows, Mac, Linux settings (monitor icon)
tick the following:
- Initialize XR on Startup
- Oculus
view example 2
- Go to Edit > Project Settings > XR Plug-in Management > Android settings (android icon)
tick the following:
- Initialize XR on Startup
- Oculus
see example 3
- Go to Edit > Project Settings > Player > Android settings (android icon) > Other Settings
In the Configuration section do:
- Scripting Backend: IL2CPP
- Untick ARMv7
- Tick ARM64
- Active Input Handling: Both
see example 4
- In the Project section search for OVRCameraRig prefab
- Drag it to the Hierarchy section
see example 5
- In the Project section search for OVRHandPrefab prefab
In the Hierarchy section do:
- expand OVRCameraRig
- expand LeftHandAnchor
- expand RightHandAnchor
- drag the OVRHandPrefab prefab from the Project section and drop it as a child for LeftHandAnchor and RightHandAnchor
see example 6
- Click on OVRHandPrefab prefab under LeftHandAnchor and ensure:
In the Inspector section:
- Hand Type: Hand Left
- Skeleton Type: Hand Left
- Mesh Type: Hand Left
see example 7
- Click on OVRHandPrefab prefab under RightHandAnchor and ensure:
In the Inspector section:
- Hand Type: Hand Right
- Skeleton Type: Hand Right
- Mesh Type: Hand Right
see example 8
- Click on OVRCameraRig and select:
In the Inspector section:
- Hand Tracking Support: Hands Only
- To adjust the tracking origin click on OVRCameraRig and choose from:
In the Inspector section:
- Tracking Origin Type: Eye Level, Floor Level, Stage
- Go to File > Build Settings
- Add the appropriate scene in the Scenes In Build
- Platform: Android
- In Android section > Run Device: [your Oculus]
- Click on Build And Run
Conclusion
I assume you have your Oculus device plugged in to your computer and it is in Developer mode and you cannot test the hand tracking in play mode in Unity.