WIDGET stays receiving inputs and working after remove

Since we can take advantage of Enhanced Input (why aren’t you?!), consider building on what it can do - Mapping Context is dynamic.

Imagine a scenario:

  • I have a character that moves with WASD
  • I have a backpack UI whose grid I also navigate with WASD

Open Backpack → Add Backpack Mapping Context with higher priority that also consumes input
Close Backpack → Remove Backpack Mapping Context

I can use WASD in both, but when backpack is open, the character does not move. When backpack is closed, it has no mapping since we removed it.

And I did not need to disable input, or change input modes.

1 Like