Write custom processors
You can write custom processors to use with bindings, actions and controls in your Project. Custom processors are available in the UI and code in the same way as the built-in processors.
To create a custom processor:
- Add a processor class and method
- Register the new processor to the Input System
- Customize the Editor UI for the new processor, if necessary.
Add a processor class and method
1. Add a class derived from InputProcessor<TValue>, and implement the Process method:
It looks like the sample you are looking for does not exist.
Important
Processors must be stateless, because they are not part of the input state that the Input System keeps. For this reason, you can't store local states in a processor if the processor changes based on the input value.
Register the new processor to the Input System
Register the new processor to the Input System. Call InputSystem.RegisterProcessor in your initialization code. You can do this locally within the Processor class:
It looks like the sample you are looking for does not exist.
Your new Processor is now available in the in the Input Actions Editor and you can also add it in code like this:
It looks like the sample you are looking for does not exist.
Customize the Editor UI
To customize the UI for editing your Processor, create a custom InputParameterEditor class for it:
It looks like the sample you are looking for does not exist.