How to detect if project is Using new or Old Input System via code?

Guys, I need to check the value of this parameter via code. I’ve tried UnityEditor.PlayerSettings but didn’t find anything.


I need this value to know how to handle the Input via code.

There are two preprocessor directives you can use: ENABLE_INPUT_SYSTEM and ENABLE_LEGACY_INPUT_MANAGER:

    // New input system backends are enabled.

    // Old input backends are enabled.

// NOTE: Both can be true at the same time as it is possible to select "Both"
//       under "Active Input Handling".

More info: Migrating from the old input system