Tap vs Hold on the same key with Unity's new Input System
Chapters
You can assign different actions to tapping a button and holding it with Unity's new input system - or double tapping it, releasing it, and more! You'll hardly need any code at all, too.
In this tutorial, I'll show you how to:
- Tap a key to trigger one effect
- Hold the same key to trigger a different effect
- Hold the key to charge up, and trigger the effect on release
- Double tap for a different effect than a single tap
- Keep an effect active while the key is held, and end it on release
π Chapters
I wrote the book on TextMesh Pro!
All infos here: https://www.christinacreatesgames.com/book/
Assets I used to create the environment of the scene:
https://assetstore.unity.com/lists/input-system-tutorial-9072429465614
π Get my PDF guidebooks on Unity UI
I have a collection of eBooks on the Unity UGUI System here:
π Itch: https://christinacreatesgames.itch.io/
β Ko-Fi: https://ko-fi.com/christinacreatesgames/shop
π¬ Discord π
You are very welcome to join! https://discord.gg/Gy7a9h3APK
ποΈ Recommended Assets
https://assetstore.unity.com/lists/highly-recommended-9071944798250?aid=1101lr4hF [affiliate]
Otherwise, using my affiliate codes for these stores helps to support my channel:
π Unity Asset Store: https://assetstore.unity.com/?aid=1101lr4hF [affiliate]
πͺ Synty Store: https://syntystore.com/christinacreatesgames [affiliate]
πͺΈ Envato Elements: https://1.envato.market/ChristinaCreatesGames [affiliate]
πHumble Bundle: https://humblebundleinc.sjv.io/xLGLNR [affiliate]
π Actionable UI Feedback for Your Game
I offer UI consulting for gamedev projects! With 15+ years of design experience and a background of a teacher, Iβm here to help:
π Learn more: https://www.vennegerts.com/en/gamedevelopment-consulting/
β Support Me on Ko-fi
If you enjoy the content and want to support my work:
π Buy me a cocoa: https://ko-fi.com/christinacreatesgames
#unitytutorial #unity3d #gamedev #indiedev
Science & Technology
#unity input system
#unity new input system
#unity tutorial
#input system interactions
#unity hold button
#unity tap and hold
#hold interaction
#tap interaction
#slow tap
#multi tap
#unity double tap
#press and release
#press interaction
#one button multiple actions
#overloaded input
#unity input actions
#gamedev
#ChristinaCreatesGames