Uhm… not sure what you’re asking and what is your background. So here it goes…
If you’re asking what to look for, it’s hard to say:
Looking at the InputDevice.enabled code it returns false when m_DeviceFlags has flags “DeviceFlags.DisabledInRuntime”, “DeviceFlags.DisabledInFrontend”, “DeviceFlags.DisabledWhileInBackground”, etc…
public bool enabled
{
get
{
#if UNITY_EDITOR
if (InputState.currentUpdateType == InputUpdateType.Editor && (m_DeviceFlags & DeviceFlags.DisabledWhileInBackground) != 0)
return true;
#endif
if ((m_DeviceFlags & (DeviceFlags.DisabledInFrontend | DeviceFlags.DisabledWhileInBackground)) != 0)
return false;
return QueryEnabledStateFromRuntime();
}
}
So you need to find who is setting those, which indeed can be hard as this code is very deep.
If you’re asking how to do debugging in general:
How to debug with Visual Studio - https://www.youtube.com/watch?v=d0815qbx3BA (random tutorial on the internet).
What you need is the “Call Stack” panel at the bottom right.
So, in VS go to the “PackageCache\com.unity.inputsystem@1.2.0\InputSystem\Devices\InputDevice.cs” file and put a break point (F9) on every line the m_DeviceFlags is set.
Attach the debugger and run the game and keep resuming till you get who is setting it with disable flags. Check with the call stack to trace back the culprit.
If your break points don’t work and you don’t see the Unity.InputSystem project in Visual Studio like so:
![7793070--984183--upload_2022-1-9_14-16-16.png](https://europe1.discourse-cdn.com/unity/original/4X/0/e/8/0e89c00480affe94ba6e6747224c34eb24779efe.png)
You need to enable generating of such projects in the preferences. Go to Edit/Preferences/External Tools and enable “Embedded packages”, “Local packages”, “Registry packages”, “Built-in packages” (one of those should be it).
![7793070--984186--upload_2022-1-9_14-18-45.png](https://europe1.discourse-cdn.com/unity/original/3X/5/5/559cdee2c6741dffca22d8e036991fa3ee259e9a.png)
Restart Unity, make sure it rebuilds the projects (reimport some .cs file).
I can’t help you much more without actually having the project right in front of me. ![:frowning: :frowning:](https://emoji.discourse-cdn.com/google/frowning.png?v=12)