Reputation: 11
When trying to set up hand tracking following the hand tracking-documentation unity just shuts down when pressing play without any crashlog/warning. Here are the steps that I have done up until the crash to reproduce my problem:
Creating completely new scene.
Importing the Oculus Integration from asset store.
Switching platform to Android.
Add OVRCameraRig to hierachy.
Change OVRCameraRig's Hand tracking support to "Controllers & Hands" on OVR Manager-script.
Up to step 5 I can press play whenever and it starts as usual. But when doing the next step it crashes everytime.
Has anyone experienced a similar problem to this?
Thanks in advance!
EDIT: Unity does not crash when removing Link cable from laptop. So has certainly something to do with link.
Upvotes: 0
Views: 1329
Reputation: 21
I wasnt getting crashes, but the hands seem to display on top of the controllers when switching so I added this script to the OVRCameraRig.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CustomHandOverride : MonoBehaviour
{
public GameObject ovrHandPrefabLeft;
public GameObject ovrHandPrefabRight;
void Update()
{
if (OVRPlugin.GetHandTrackingEnabled())
{
ovrHandPrefabLeft.SetActive(true);
ovrHandPrefabRight.SetActive(true);
}
else
{
ovrHandPrefabLeft.SetActive(false);
ovrHandPrefabRight.SetActive(false);
}
}
}
Oculus Pro Unity 2023.3.1f1
Upvotes: 0
Reputation: 3
I don't know if you were able to solve this issue or not, but for any other person who is facing a similar issue, here is how I solved it:
OVRPlugin.GetHandTrackingEnabled()
Set both the OVRHandPrefab to true only when OVRPlugin.GetHandTrackingEnabled()
returns true, something like this:
if (OVRPlugin.GetHandTrackingEnabled())
{
ovrHandPrefabLeft.SetActive(true);
ovrHandPrefabRight.SetActive(true);
}
else
{
ovrHandPrefabLeft.SetActive(false);
ovrHandPrefabRight.SetActive(false);
}
This should avoid Unity from crashing.
Upvotes: 0
Reputation: 5847
Have you tried enabling hand tracking in your Quest Headset (while unplugged)?
Its in Settings -> Experiments -> Enable Hand Tracking
I also have 'Auto detect hands or controllers' enabled. To see your hands, the new OVRCustomHandPrefab does the trick.
[Edit]
Also the headset seems to cause crashes after its been sitting on the desk connected to Link for more than a few minutes. Unplugging and reconnecting will refresh it.
Upvotes: 0