Input System Interactions Explained | Press, Hold, Tap, SlowTap, MultiTap - Unity
samyam
Today we go over Interactions in Unity's New Input System. I go what makes an interaction, how it impacts the actions, the individual actions themselves, code overview, interaction priority and multiple interactions, and custom interactions.
📥 Get the Source Code 📥 https://www.patreon.com/posts/54177140
🤝 Support Me 🤝 Patreon: https://www.patreon.com/samyg Donate: https://ko-fi.com/samyam
►🔗 Relevant Video Links 🔗 ᐅInput System Action Types Explained | Value, Passthrough, Button - Unity https://youtu.be/DMUZfVSYJfs ᐅInteractions Documentation https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/Interactions.html https://github.com/Unity-Technologies/InputSystem/blob/bcc89c252897385f1adb8e3fc320e7a7c442862b/Packages/com.unity.inputsystem/Documentation~/Interactions.md#default-interaction ᐅInterface IInputInteraction Documentation https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/api/UnityEngine.InputSystem.IInputInteraction.html ᐅPress Interaction Example https://github.com/Unity-Technologies/InputSystem/blob/stable/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs
First I explain what an interaction is within Unity's Input System. Then I go over how the event callbacks work in the Input System, which is important to understand how interactions impact it. Then, I'll be going over each interaction individually, Press, Hold, Tap, SlowTap, and MultiTap. I explain their behavior and how they call the event callbacks in the action. Then I provide a visual explanation on the different interactions to better solidify the point.
After the main explanation is done, I go over priority of interactions, specifically having the interaction on the action versus the binding, and what happens when there are multiple interactions on the same action or binding. There is a visual example provided for that as well.
Finally, I go over a custom interaction which can be added via code or through the Input Action Asset that you create.
►⏱️ Timestamps ⏱️ 0:00 Intro 0:08 Install Input System 0:45 Input Action Asset 1:18 Interactions Intro 1:47 What is an interaction 2:22 Event Callbacks 4:13 Press Interaction 5:00 Hold Interaction 5:25 Tap Interaction 5:44 SlowTap Interaction 6:09 MultiTap Interaction 6:45 Visual Explanation of Interactions 7:44 Code for Visual Explanation 8:05 Interactions Visual Graph 9:20 Binding & Action Interactions 10:24 Interaction Priority 11:38 Script for Multiple Interactions 12:49 Visual Explanation of Interaction Priority 13:58 Add Bindings & Interactions through Code 14:57 Get Timeout of Interactions 15:29 Custom Interactions (Shows up in Input Action Asset!) 18:46 Outro
💖💖THANK YOU TO ALL MY PATRONS 💖💖
❯❯❯ My Links ❮❮❮ ... https://www.youtube.com/watch?v=rMlcwtoui4I
105057440 Bytes