yasirkula / UnityIngameDebugConsole

A uGUI based console to see debug messages and execute commands during gameplay in Unity
MIT License
2.05k stars 218 forks source link

Disable unity input manager #87

Closed ddsurvivor closed 7 months ago

ddsurvivor commented 10 months ago

When using old input manager, if it is possible to add a feature to disable the input manager? So that my character will not running when I texting "ad".

yasirkula commented 10 months ago

I think the best you can do is check if an InputField has focus and if so, ignore wasd keys in your player movement script:

EventSystem eventSystem = EventSystem.current;
return !eventSystem || !eventSystem.currentSelectedGameObject || !eventSystem.currentSelectedGameObject.TryGetComponent(out InputField inputField) || !inputField.isFocused;