GridVids
Sign in with YouTube

How to create a Button with Modifiers in Unity UI (ctrl, alt, shift, shoulder button, ...)

Christina Creates Games Apr 7, 2025 13:01
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Don't Miss
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Mark watched
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Hide
Open in popup Open on YouTube
Share video

Share video

Copy the GridVids link or iframe code.

Video link
Iframe code
Iframe content

Chapters
This tutorial teaches you how to create a button that uses modifiers to change its behaviour. This will use the new input system. A typical use case would be an inventory or resource management system, where one click takes an item, using the shift modifier with a click takes multiple, alt modifier with a click chops the stacks in two and so on. This system will handle: - OnClick events for no modifier, one modifier, another modifier or both at the same time - Notifier events to subscribe to, depending on which combination of modifiers you hold down Hope you enjoy it! āœ’ļø Github: https://github.com/Maraakis/ChristinaCreatesGames/tree/main/Modifier%20Button šŸ“– Chapters šŸ“ Get the PDF Version of my tutorials Would you rather read a book? I have a collection of eBooks on the Unity UGUI System here: šŸ“˜ Itch: https://christinacreatesgames.itch.io/ šŸ’¬ Join the Discord You are very welcome to join https://discord.gg/8pDT2J2TBX ! šŸŽ® Play My Games šŸŽ² https://christinacreatesgames.itch.io šŸ›ļø Recommended Assets https://assetstore.unity.com/lists/highly-recommended-9071944798250?aid=1101lr4hF [affiliate] šŸ“– List of books all around Gamedev and Design I recommend: https://www.christinacreatesgames.com/bookshelf 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] 🟦 Amazon: https://amzn.to/3G8NgFq [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
#Modifier Button Unity #Unity Button #Unity UI #Unity new input system #Unity new input system Button #Unity UI Tutorial #Unity Button Tutorial