Skip to main content
New Participant
May 8, 2024
Solved

Unity Build crashes when swiching from hand tracking to controllers

Hi Everyone,

Any help with this would be great.

Using Unity 2022.3.10f1 and Meta All-In-One SDK, I build my app and run it on my Quest 3.

The home scene loads with hand tracking fine. When I pick up the controllers, the game freezes and crashes.

I have the following settings applied to the OVR camera rig:

 

New Participant
May 15, 2024

Update:

Hi everyone.

I think I fixed the problem, but not 100% sure if I've really fixed it...

I updated the OVRControllerHelper.cs script, which I think was missing a line:

line 202 onwards:

case OVRPlugin.SystemHeadset.Meta_Quest_3:
I added the following line here: activeControllerType = ControllerType.TouchPlus;
And the break as well: break;
case OVRPlugin.SystemHeadset.Meta_Link_Quest_3:
if (profile == OVRPlugin.InteractionProfile.TouchPro)
{
activeControllerType = ControllerType.TouchPro;
}
else
{
activeControllerType = ControllerType.TouchPlus;
}
break;
default:
activeControllerType = ControllerType.QuestAndRiftS;
break;

This might explain why the error was only happening when playing on the headset, and not happening when using a link cable on the Unity Editor.

I upgraded my project from the Oculus Integration to the Meta all-in-one SDK recently, which might have been behind the crashing...

Anyway, if anyone has a similar problem let me know. Like I said I'm not convinved I fixed this issue, but I've tested a new build with the updated code and it hasn't crashed... yet...

🤣

1 reply

georgesearsAuthorAnswer
New Participant
May 15, 2024

Update:

Hi everyone.

I think I fixed the problem, but not 100% sure if I've really fixed it...

I updated the OVRControllerHelper.cs script, which I think was missing a line:

line 202 onwards:

case OVRPlugin.SystemHeadset.Meta_Quest_3:
I added the following line here: activeControllerType = ControllerType.TouchPlus;
And the break as well: break;
case OVRPlugin.SystemHeadset.Meta_Link_Quest_3:
if (profile == OVRPlugin.InteractionProfile.TouchPro)
{
activeControllerType = ControllerType.TouchPro;
}
else
{
activeControllerType = ControllerType.TouchPlus;
}
break;
default:
activeControllerType = ControllerType.QuestAndRiftS;
break;

This might explain why the error was only happening when playing on the headset, and not happening when using a link cable on the Unity Editor.

I upgraded my project from the Oculus Integration to the Meta all-in-one SDK recently, which might have been behind the crashing...

Anyway, if anyone has a similar problem let me know. Like I said I'm not convinved I fixed this issue, but I've tested a new build with the updated code and it hasn't crashed... yet...

🤣