What's the purpose of PlayerInput.uiInputModule?

I’m trying to understand the PlayerInput component a bit better, and I’m wondering what the UI Input Module property is for?

The UI Input Module seems to work fine on its own, and the PlayerInput doesn’t seem to interact with it. And even when synched you still have to manually set up the UI Input Module as far as I see.

So I’m not sure what this is for. Why can you assign a UIInputModule to a PlayerInput component?

I vaguely recall looking into this same question when toying around with the input system for split screen, multiplayer. The short answer, I determined long ago, It glues some systems together; just assign it and don’t think too much about. (Probably only really matters for MP game?) Since the player input component and Input System UI input module component should have the same action asset assigned, at the surface level it seems odd that you should associate the two via a variable in the player input component. The tooltip for the variable says it’s for syncing the actions between the two components.

----The documentation states-----------------------------------------------

The PlayerInput component can work together with an InputSystemUIInputModule to drive the UI system.

To set this up, assign a reference to a InputSystemUIInputModule component in the UI Input Module field of the PlayerInput component. The PlayerInput and InputSystemUIInputModule components should be configured to work with the same InputActionAsset for this to work.

Once you’ve completed this setup, when the PlayerInput component configures the Actions for a specific player, it assigns the same Action configuration to the InputSystemUIInputModule. In other words, the same Action and Device configuration that controls the player now also controls the UI

If you use MultiplayerEventSystem components to dispatch UI events, you can also use this setup to simultaneously have multiple UI instances on the screen, each controlled by a separate player.

ok and then how should we make the UI navigation and submit work ?
in the dcumentation there are only examples with CREATE.

there is no straightforward example of using them, just the above theory

I see… This bit about how in doing so “the same Action and Device configuration that controls the player also controls the UI” makes sense to me. I imagine that that way you can set up settings on the PlayerInput’s instance of the actions asset and those will automatically transfer over to the InputModule. Thank you for the explanation!

Each control has it’s own set of callbacks you can register. such as mybutton.Onsubmit.AddListener( MyHandler )

I did make it work like this:

  1. switch player map (i use IS) to UI map and back (with same button)
  2. have the toolkit connected to IS
  3. navigation and keys just work and I am manipulating the uxmls

It seems to me that in this case I do not need to submit / add listener, isnt it ?
I mean I allready have navigation, submit, cancel …