Editor fps crawls when input used with new system, help!

Bringing in the new inputsystem to our project causes the editor to drop frames aggressively whenever it’s getting inputs. We use the playerinput manager invoke unity events, 0.9.5. We noticed on a simple OnMove using the left stick on a gamepad, canceled is being called even though we have the stick held down. Looking through the profiler doesn’t really help as everything looks ok, although our vsync stack shrinks in response. Thoughts? Has anyone run into this before?

Sorry for the long delay.

We’ve had occasional reports here and there of users experiencing something similar to what you describe but so far haven’t been able to reproduce or pinpoint this some more details would be greatly appreciated.

Is this on Windows? Are you seeing a change if you put only “Gamepad” in “Supported Devices” in the input settings (Edit >> Project Settings >> Input System Package)?

Does it matter where the inputs are coming from or does the slowdown happen no matter what? While the frame drops are happening, are you seeing a corresponding spike in the “InputUpdate” profiler sample? Also, are the frame drops also happening if you don’t have any PlayerInputs or PlayerInputManagers enabled?

For me the editor gets very slow when an .inputactions asset is selected and shown in the inspector. In this case, everytime the inspector updates, it costs about 200ms here.

I’m able to reproduce this easily by doing:

  • Select an .inputactions asset
  • In the Inspector, click in the “C# Class Name” text field
  • Move input caret around in the text field

Profiler Screenshot

Unfortunately I haven’t been able to recreate it! I bounce between my pc and mac for development and it’s only ever happened on Windows. Though after a reboot of the machine, or a new git pull, it seems to be resolved now. Certainly weird behaviour. IIRC, it only ever happened with the gamepads ( xbox 360, one ) sending their input. I noticed if I have the “stats” button clicked while the game runs, the ms response time would lower whenever inputs were received, and flow back to their regular interval as they were released. Not sure if that helps at all.

This looks like a possible regression in the 2019.3 editor UI overhaul. Can’t reproduce here on my end, though, with 2019.3b4.

Sorry for bumping old tread, but I have the same problem using Unity 2020.2.0f1, InputSystem 1.0.1 in a XR setup.

As soon as I add a Player Input script (class reference), the FPS drops in my Oculus Quest 2 headset from a steady 72 fps to around 30. And then is lays there steadily.

If I deactivate the GameObject the PlayerInput class is attached to during gameplay, the FPS goes right back up to 72 again.

If I disable “Auto-Switch” in the Player Input component and set XR as the default scheme, the fps lays steady on 72 fps too, so I guess it has something to do with that. The same things happens if I remove all other schemas but my XR one, but also have Auo-Switch on. But then there’s no schemas to switch between, so I guess that’s same same. (and then it’s hard to develop when I cant use my keyboard, but always is forced to use the VR controllers).

My settings:
In my .inputactions file I currently have the default Keyboard&Mouse, Gamepad, Touchscreen and Joystick. But also the XR bindings. All with a specifix scheme attached to each binding.

In Input System Package settings, the supported devices list is empty

Did some more testing, and created a test repo for this with four different examples in different branches:
https://github.com/Sandstedt/unity-example-new-input-system

But during my testing in this clean project, I couldn’t see any differences in performance.

~Will continue my testing adding XR Plugin Management, and Oculus Integration (OVR Plug-in).~

Also made some test with the XR Plugin Management and Oculus Integration (OVR Plug-in), and got a solid 90 fps on my Oculus Quest 2. So no problems here either. But had to go through OVR Performence Lint tool and do things like enable IL2CPP backend, changing to ARM64 and other optimizations that was recommended by that tool. Before that I was running basically half the speed.

(btw, this could be related to this issue: https://forum.unity.com/threads/inputcheckforunpaireddeviceactivity-lag-spikes.994864/)