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.

171023-imagem-2020-11-14-141815.png

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:

#if ENABLE_INPUT_SYSTEM
    // New input system backends are enabled.
#endif

#if ENABLE_LEGACY_INPUT_MANAGER
    // Old input backends are enabled.
#endif

// 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