Converting Interactable Legacy Input to the New Unity Input System
Objective: Converting Interactable Legacy Input to the New Unity Input System.
Before doing anything create InputAction assets, then createAction map an action called Interact and two bindings.
In the first step, Initialize the Input Action Assets in the start method, enable it then create a performed event and canceled event function. I add the Start event in the end.
In the performed function I will move code to check if we are in the zone and if we press the E Key then I will remove the old input code with the context dot performed.
I will take the code to allow the user to press button and do some action according to that zone Id.
Then I will check if use the let go Key so I can cancel calling some logic for specific zone.
Let's see the Result
See you at the next one, Suleiman out.