Input/EventSystem causes massive performance loss

Hello, I’m resorting to making this post after hours of fighting with the issue…

TLDR: New Input System + UI Toolkit causes 30+ fps drop, as we’re forced to have an EventSystem component, due to no compatibility between the two systems (Come on Unity…).

I’ve recently been working on improving performance of my HDRP game, which it still at a very basic state, but was performing horribly.
After noticing some weird CPU consumption through the profiler showing PreUpdate.NewInputUpdate taking up 20ms I decided to look through the project settings.

I noticed that Project Settings > Player > Configuration > Active Input Handling was set to “Both”.
After changing from “Both” to “Input System Package (New)” I see a 30 fps improvement (50 to 80).

This however causes me to no longer be able to interact with UI elements (Using UI Toolkit), such as pressing menu buttons etc.
The only way for me to make it work again is by adding an “Input System UI Input Module” component to my UI Document object, but then I’m back to 50 fps.

How any developer makes a performant game with HDRP is beyond my understanding. The amount of small things causing unplayable experiences are countless. These are some very basic requirements that every game relies on, but somehow unity manages to make it a massive bottleneck.
This is besides the main point though…

Any thoughts on how I fix this massive bottleneck?
Why is “Input System UI Input Module” component causing 30 fps drop (Same results if I add an EventSystem to the scene hierachy)?

Thanks

3 Likes

Thank you for your feedback. You say that simply adding the EventSystem creates the same problem; do you get the same performance hit if you use EventSystem + StandaloneInputModule (with Active Input Handler set to either “Both” or “Legacy”)?

Built-in support for UI Toolkit + new Input without the EventSystem component is something we are working on right now. Work on this feature is a joint effort between the Input team and the UI Toolkit team. I can see how the performance hit you are describing is clearly an obstacle for development. I will make sure avoiding such a regression is part of our validation process. Thanks again. Use cases like yours definitely fall within the normal parameters of using Unity and our objective is that it should work effortlessly out of the box.