Hey everyone,
Recently, we identified a minor bug in the Unity assets that affects a small percentage of Leap Motion Controllers. This causes demos to crash when running devices with certain serial numbers.
Fortunately, there's an easy fix! Simply go to Assets/LeapMotion/Scripts and add just one line to HandController.GetDeviceInfo():
info = new LeapDeviceInfo(LeapDeviceType.Peripheral);
The script should look like this:
switch (devices[0].SerialNumber.Substring(0, 2)) {
case ("LP"):
info = new LeapDeviceInfo(LeapDeviceType.Peripheral);
break;
case ("LE"):
info = new LeapDeviceInfo(LeapDeviceType.Dragonfly);
break;
default:
//Add this ->
info = new LeapDeviceInfo(LeapDeviceType.Peripheral);
break;
}
This bug was introduced with the V3.0.0 Core Assets, and will not show up in older projects.
If you've imported the V3.0.0 core assets, and your script doesn't look like this, it's possible that your core assets import wasn't entirely successful. This is a common issue with updating the Unity assets in an older project. If this is the case, you may need to re-import the assets.