Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No response after updating mac project to beta1 #25

Open
PatHightree opened this issue Mar 14, 2021 · 22 comments
Open

No response after updating mac project to beta1 #25

PatHightree opened this issue Mar 14, 2021 · 22 comments

Comments

@PatHightree
Copy link
Owner

Hello @PatHightree Thank You very much for this.

I'm on unity 2020.1.17f1 on Mac Big Sur

I created a new unity project.

I downloaded and installed the new input manager via package manager and enabled it in player settings.

I downloaded your space navigator package from the develop section and installed it from disk via package manager (SpaceNavigator Driver 2.0.0.beta.1).

I've got the SpaceNavigator Inspector in the Windows menu in Unity and I connected the Space Navigator hardware.

I restarted Unity Editor - but I get no reaction from the Space Navigator - either in EDITOR or PLAY mode.

Am I doing something wrong?

Kind Regards

Originally posted by @makaruk in #24 (comment)

@PatHightree
Copy link
Owner Author

PatHightree commented Mar 14, 2021

Did you follow the Upgrade from 1.x steps in the readme ?

Might be that you haven't switched your project to the new input system yet.
If you have, Project Settings/Player/Active Input Handling should look like this :
image

@PatHightree
Copy link
Owner Author

I added an error message in version 2.0.0-beta.2 to indicate when the new input system in not active.
The readme also has more info regarding switching between input systems (you can have both active at the same time).
Please check and see if this helps.

@klvnptr
Copy link

klvnptr commented Mar 15, 2021

I just tested beta3, and it doesn't do a thing :( Followed readme word by word. New input system is in place (i was already using that). I'm on x86 based Mac, with 2020.3.0f1
Is there any way I can help you debug this? Thanks

@makaruk
Copy link

makaruk commented Mar 15, 2021

Hi @PatHightree - I have the same non responsive situation as @klvnptr describes.

The new Input system is most definitely installed and active in my editor. I am not switching from the old version of the driver - I made a fresh Unity project with the SpaceNavigator Driver 2.0.0.beta.3 driver installed from my hard drive.

I downloaded the sample scenes from the package manager - and no response at any stage - eeither EDIT or PLAY mode. And no errors in the console too...

Kind Regards

@PatHightree
Copy link
Owner Author

Just checking, you both are using SpaceNavigator devices ?

Please open Window/Analysis/Input Debugger and check if the SpaceNavigatorHID device is present.
Please click open the highlighted entries and post a screenshot.
image

@klvnptr
Copy link

klvnptr commented Mar 15, 2021

Yes, I'm using Space Navigator.
image

@PatHightree
Copy link
Owner Author

Ok good, the SpaceNavigatorHID device is detected on Mac, that's a big step forward.
Can you double click the top SpaceNavigatorHID entry and post a screenshot of that.
Should look like this :
image

Please move the puck and tell me if both translation and rotation data changes, or only one of the them.
If both are changing, please try to move only one axis for translation and see if the values correspond with the movement you made.
Then do the same for rotation.

@makaruk
Copy link

makaruk commented Mar 15, 2021

Hi @PatHightree

Yes, I also confirm I'm running the Space Navigator - please see the attached Analysis/Input Debugger screenshot.

And when I double click it the popup window appears with the details - however none of the sensors receive any input.

When I move the SpaceNavigator the values do not change.

When I disconnect the SPaceNavigator from the USB port it dissapears from the Input Debugger entirely and reappears after reconnecting - so there's no USB malfunction and anyway it works OK with other software.

Screenshot 2021-03-15 at 13 40 08

Screenshot 2021-03-15 at 13 39 29

Screenshot 2021-03-15 at 13 38 36

Screenshot 2021-03-15 at 13 44 11

@PatHightree
Copy link
Owner Author

Well, those Input Debugger screenshots look identical to mine.

  • Can you try uninstalling the 3DConnexion driver and see if that makes any difference ?
  • Just a sanity check : Operation mode is set to Fly in the SN window, right ?

I don't have a mac and organizing one and setting it up for development is not really doable at the moment.
I can instrument the driver with debug logs, that might tell me where the initialization flow breaks.

@PatHightree
Copy link
Owner Author

I just pushed 2.0.0-beta.4 which contains the debug logs.
Enable logging by adding SPACENAVIGATOR_DEBUG to Project Settings/Player/Scripting Define Symbols and click Apply.

@makaruk
Copy link

makaruk commented Mar 15, 2021

Hi @PatHightree
I removed the SpaceNavigator Driver from the system and it started responding!

However it is quite jittery. I'm using 2.0.0-beta.4 with debugging enabled.

The first thing I noticed is that it RANDOMLY moves the MOUSE cursor and moves the focus away from Unity Editor - most often when i PUSH THE NAVIGATOR DOWN - please see the attached movie to better understand it.

https://drive.google.com/file/d/1BDeVGIJxRVjai8ZAwowz3WELPHM4Nzf2/view?usp=sharing

Also it randomly moves the mouse cursor around the whole screen (most often the cursor goes into screen corners) - hence the dock and mac notification centre appearing randomly - no mouse is physically moved during the test.

Also when using the "Follow Curve" sample scene it works OK in the EDITOR mode but goes completely jittery in PLAY MODE.

Also the whole editor slows down in the first launch of the EDITOR mode in Unity in the "Fly Around" example - but when I switch to PLAY MODE it works normally.

Please see the DEBUG LOG from Unity in the link below:

https://drive.google.com/file/d/1R5I66Hm66l2J5wR1Ad0BcMZ-a5frhXCt/view?usp=sharing

Kind Regards

@klvnptr
Copy link

klvnptr commented Mar 15, 2021

Values don't change for me as well :(
image
I have the latest driver installed.
image

@PatHightree
Copy link
Owner Author

It's alive !

If the debug logging is on, then then it's normal that it's jittery.
Turn off logging by removing the SPACENAVIGATOR_DEBUG symbol.
Does that help ?

Looking at your log, there is much more going on than just my logs.
The input system's InputManager is very unhappy about something.

This is logged over and over again:

InvalidCastException: Specified cast is not valid.
  at UnityEngine.InputSystem.InputManager.OnBeforeUpdate (UnityEngine.InputSystem.LowLevel.InputUpdateType updateType) [0x00046] in /Users/r2d2/Desktop/newinputsystem/Library/PackageCache/[email protected]/InputSystem/InputManager.cs:2198 
  at UnityEngine.InputSystem.LowLevel.NativeInputRuntime+<>c__DisplayClass10_0.<set_onBeforeUpdate>b__0 (UnityEngineInternal.Input.NativeInputUpdateType updateType) [0x00000] in /Users/r2d2/Desktop/newinputsystem/Library/PackageCache/[email protected]/InputSystem/NativeInputRuntime.cs:101 
  at UnityEngineInternal.Input.NativeInputSystem.NotifyBeforeUpdate (UnityEngineInternal.Input.NativeInputUpdateType updateType) [0x0000f] in /Users/bokken/buildslave/unity/build/Modules/Input/Private/Input.cs:105 

The strange thing is that my code is nowhere in the call stack, very strange.

The mouse moving by itself sounds like something I've seen here on windows : pitching the SN scrolls lists up/down
On windows 3dconnexion installs a keyboard/mouse emulator, maybe something simmilar is installed on mac ?

@makaruk
Copy link

makaruk commented Mar 15, 2021

On windows 3dconnexion installs a keyboard/mouse emulator, maybe something simmilar is installed on mac ?

I don't think there is a mouse emulator on mac - and anyway thee driver is now removed from my system and OSX trie to be kind of thorough when removing stuff - but this is something I am unable to check in detail unfortunately...

And I am not really sure why the input manager would have a problem... this is a project with thee new input manager and space navigator driver imported - nothing else was done on the project...

@klvnptr
Copy link

klvnptr commented Mar 15, 2021

Installed beta4. No luck :( Numbers are still not moving.
image

@PatHightree
Copy link
Owner Author

@klvnptr have you tried uninstalling the 3DConnexion driver ?

@klvnptr
Copy link

klvnptr commented Mar 15, 2021

No. I didn't touch the driver. If I uninstall that, how can I use SpaceMouse with Cinema4D and Blender using my settings?

@PatHightree
Copy link
Owner Author

Right, I'm affraid that is the only way to get data into the Unity driver at the moment.
And even then it's not working smoothly yet.

Until I get access to a mac, I won't be able to make much progress in debugging the mac side of the driver.
Kinda figures... Unity didn't work out of the box with SN on windows either :\

@PatHightree
Copy link
Owner Author

I have a mac now, so I can finally look into this issue.
However, I am unable to reproduce the issue on my machine, editor and runtime navigation are working as expected.
The latest 3Dconnexion software version 10.6.7 is installed.
Oddly enough that is a lower version number than was reported earlier in this thread (10.7.0).
Maybe 3Dconnexion pulled 10.7.0 for some reason, or maybe it is because of my mac mini, which is running an older version of macos.
Can you try again with 10.6.7 please ?

@chargedneuron
Copy link

Im a bit late to the party here. I have tried to get the new Space Navigator package to work without luck also, (on a Mac), but haven't put much effort in to it yet.

The reason you are seeing a different Driver version is because 3dconnection released a beta driver to address the significant changes to macOS Extensions. The beta driver was a little bit difficult to find. See this link;
https://3dconnexion.com/us/support/faq/beta-driver-for-macos-11-big-sur/

the discussion for the beta driver can be found here;
https://forum.3dconnexion.com/viewtopic.php?f=23&t=39825

Also it is recommended to update the Space Mouse Firmware to match the 'newer' driver.

My issues seem to match those above, where the Space Mouse is usable in other programs but not Unity. I will install the latest repo later today and test it again.

@chargedneuron
Copy link

I can confirm that uninstalling the 3DConnexion Driver does allow input to arrive into the Unity Input System. However at this time I can not rotate the camera in the editor, (tested on SN 2.0.0.beta-7 vs 2021.2.1.f1, 2021.1.28f LTS, 2020.3.22f1 LTS, and 2019.4.32f1 LTS). I see that missing Rotation input is mentioned on other threads.

The 3DConnexion driver is needed to get the macOS to recognize the left hand buttons as Keyboard Keystrokes. In other words, the new(er) macOS will not directly recognize the ESC, Shift, CTRL, ALT buttons as keystrokes without the driver, (as I understand it). I can confirm this because without the driver installed Blender does not 'see' these keys. And even with the driver macOS still ignores some of these buttons in Blender using the beta driver 10.7.0 (known issue for this driver vs macOS).

I am using a SpaceMouse Pro Wireless, and a SpaceMouse Wireless. Both wired and wireless modes.

@h-a-n-n-e-s
Copy link

Hi!
Is there any news about using the SpaceMouse in Unity on a Mac?

Same as above, I can confirm that for the SpaceNavigator Driver (2.0.0-pre.9), the HID is detected but the numbers don't change if I move the SpaceMouse.

I haven't uninstalled the 3DConnexion Driver since I need it for all my other programs to work with the SpaceMouse, so this is not an option for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants