PatHightree / SpaceNavigator

SpaceNavigator driver for Unity3D
MIT License
170 stars 55 forks source link

Exception when Driver isn't installed #16

Closed Dantorius closed 3 years ago

Dantorius commented 6 years ago

Hi folks,

first things first. You did an amazing job with this unity plugin. it is easy to install and even more easy to use. However, we are developing software for a big customer where the setup of the workstations, where our software is used, is quite different. So it doesn't look good, if there are Exceptions logged, when the driver isn't installed or the device isn't connected.

We figured out, that the plugin is logging an exception, when unity is started/used, and the driver for the Spacemouse isn't installed. This error is logged in the SpaceNavigatorWindows.cs, Dispose Method, starting at line 68.

Currently we just altered the catch-block to log a warning that says "Spacemouse Driver not installed".

Further, we implemented our own input handling, where we are managing different inputcontroller, based on what devices are connected to the workstation. For that, it would be very cool, if there was method in the plugin to check if there is a spacemouse connected to the computer or not.

As I've seen in the SpaceNavigatorWindows.cs, there is already something like a connected-state.

Thanks in advance and keep up your great work!

PatHightree commented 6 years ago

Sorry to say that the Connected info is not trustworthy, the driver info I get isn't correct. Unfortunately the method of how I connect to the driver is kind of outdated. I'm not able to easilly update it because it is not the way the 3dconnexion sdk wants you to communicate with it. But it was the only way I was able to integrate it into Unity.

You can read more about it in the forum thread: https://forum.unity.com/threads/spacenavigator-driver-opensource.182382/

PatHightree commented 3 years ago

Closing this issue as with version 2.0.0, the driver has moved away from communicating with the device via 3dconnexcion's driver, in favour of direct HID communication via Unity's new Input System.