An interesting advantage of this architecture is how it facilitates testing. Having completely decoupled our application objects from the input device, we can simulate input actions without actually using physical input controllers. For example, try this:
- Select MeMyselfEye in Hierarchy. Then in Inspector, temporarily disable the My Input Controller component by unchecking its checkbox.
- Select the My Input Action Data object in the Project ScriptableObjects/ folder
- Press Play.
- While the game is running, in Inspector, change the Button Action from None to PressedDown.
- The BalloonController thinks a PressedDown action has occurred. It creates a new balloon and begins inflating it.
- In Inspector, change ...