@samyam
  @samyam
samyam | Input System Interactions Explained | Press, Hold, Tap, SlowTap, MultiTap - Unity @samyam | Uploaded July 2021 | Updated October 2024, 4 hours ago.
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 full Source Code Bundle to my Unity Tutorials 🤓
sam-yam.itch.io/samyam-full-source-code-to-all-videos

📥 Get the Source Code 📥
patreon.com/posts/54177140

🤝 Support Me 🤝
Patreon: patreon.com/samyg
Donate: ko-fi.com/samyam

►🔗 Relevant Video Links 🔗
ᐅInput System Action Types Explained | Value, Passthrough, Button - Unity
youtu.be/DMUZfVSYJfs
ᐅInteractions Documentation
docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/Interactions.html
github.com/Unity-Technologies/InputSystem/blob/bcc89c252897385f1adb8e3fc320e7a7c442862b/Packages/com.unity.inputsystem/Documentation~/Interactions.md#default-interaction
ᐅInterface IInputInteraction Documentation
docs.unity3d.com/Packages/com.unity.inputsystem@1.0/api/UnityEngine.InputSystem.IInputInteraction.html
ᐅPress Interaction Example
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.

Disclosure: This post may contain affiliate links, which means we may receive a commission if you click a link and purchase something that we have recommended. While clicking these links won't cost you any money, they will help me fund my development projects while recommending great assets!

😎 Other Cool Unity Assets 😎
ᐅPeek - Editor Toolkit: assetstore.unity.com/packages/tools/utilities/peek-editor-toolkit-149410
ᐅEditor Console Pro: assetstore.unity.com/packages/tools/utilities/editor-console-pro-11889
ᐅRainbow Folders 2: assetstore.unity.com/packages/tools/utilities/rainbow-folders-2-143526

►⏱️ 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 ❮❮❮
💗 Patreon 💗
patreon.com/samyg
💬 Discord Server 💬
discord.gg/mj3dSnmaZc
🐦 Twitter 🐦
twitter.com/samyam_utube
📚 Facebook 📚
facebook.com/samyam.youtube
🎵 Music 🎵
Ambient Gold
streambeats.com
👍 Like and Subscribe! 👍

🖥️ Computer Setup 🖥️
*As an Amazon Associate I earn from qualifying purchases.
amazon.com/shop/samyam

#madewithunity #gamedev #unity
Input System Interactions Explained | Press, Hold, Tap, SlowTap, MultiTap - UnitySalvaging a Superhero Game | 6 Devs Pass the Project Challenge in Unity Pt2Make Line Rider in Unity Pt.4 - Player Physicsim making a cute precision platformer game #indiegameThe Ultimate Multiplayer Tutorial for Unity - Netcode for GameObjectsLearn Unreal Engine 5 with me! Parkour System Live Stream #1I Found The BEST Unity BLACK FRIDAY Sales, So You Dont Have ToBEST Royalty-Free Assets for Game Developmentgta6 NEW animationsI made a game in a space capsuleLearn Unreal Engine 5 with me! Parkour System Live Stream #8 - Fixing the Wall RunningMaking a Game with AI

Input System Interactions Explained | Press, Hold, Tap, SlowTap, MultiTap - Unity @samyam

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER