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

SceneView does not receive input (since at least Unity 2020.3.15f) #36

Open
krisrok opened this issue Aug 23, 2021 · 8 comments
Open

SceneView does not receive input (since at least Unity 2020.3.15f) #36

krisrok opened this issue Aug 23, 2021 · 8 comments

Comments

@krisrok
Copy link

krisrok commented Aug 23, 2021

GameView needs to have focus for inputs being processed by InputSystem.

We have this behaviour on three separate Windows machines with two wireless (Universal Receiver, VID: 0x256f, PID: 0xc652) and one wired spacenavigator (SpaceMouse Compact, VID: 0x256f, PID: 0xc635).

After focus goes to Sceneview the InputSystem processes exactly one state event, then nothing. When refocussing GameView, the cumulated state events get processed in one batch. Or at least they get displayed in the InputDebug view.

Unity 2020.3.15f
InputSystem 1.0.2

@krisrok
Copy link
Author

krisrok commented Aug 23, 2021

I imagine the problem is the canRunInBackground property of InputDevice is returning false which is the device's correct answer in the usual use-case. But in Unity we have a special case (like an app-inside-the-app) which is not catered for in the InputSystem as far as I can see.

Others have circumvented this issue by using a local copy of the InputSystem package with the canRunInBackground checks patched out.

@krisrok
Copy link
Author

krisrok commented Aug 23, 2021

In an attempt to deliver reproducability I set up a project from scratch on 2020.3.8f and SceneView navigation works fine (sometimes there is a few seconds delay after Unity's startup which likely is due to a known InputSystem bug related to Windows' hibernation feature, ugh...)

Then I upgraded the project to 2020.3.15f and the problem described above happens immediately. Downgraded the same project to 2020.3.8f and it works again even though packages stay at their 2020.3.15f upgraded versions.

I do not have any other editor versions in between of .8f and .15f so it's hard to tell when the breaking change happened.

@krisrok
Copy link
Author

krisrok commented Aug 23, 2021

Stays broken on .16f, too.

@krisrok krisrok changed the title SceneView does not receive input SceneView does not receive input (since at least Unity 2020.3.15f) Aug 23, 2021
@PatHightree
Copy link
Owner

I'm seeing it too, I thought it had something to do with adding the 'Suspend on GameView Focus' setting, but no.
Unity U2021.2.0b3
InputSystem 1.1.0-pre.5

@PatHightree
Copy link
Owner

AH, someone reported the issue on the Unity forums and fogbugz, investigation is already in progress :)
https://forum.unity.com/threads/configuring-canruninbackground-for-a-custom-inputdevice.1012072/
https://fogbugz.unity3d.com/default.asp?1360170_vkkvm9posrgpqdke

@krisrok
Copy link
Author

krisrok commented Aug 23, 2021

Such coincidence! ;) Yeah let‘s hope it will be addressed.

@patrickdown
Copy link

I am having this issue too. Is there a work around in the short term until Unity fixes?

@krisrok
Copy link
Author

krisrok commented Sep 17, 2021

You can only downgrade your project to e.g. 2020.3.8f. I only know it worked on .8f and broke somewhere on the way to .15f -- maybe you can find the exact version if you're persistent. If so, please report it here or in the forums.

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

3 participants