Skip to main content
GameDev.net gamedev.net
Video Content

This is video content from git-amend. The summary highlights key points - watch the full video for complete context.

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

git-amend
git-amend Video
· 1 month ago • git-amend

Press vs Hold Interactions in Unity (With Conditions)

Briefing

git-amend demonstrates a Unity interaction architecture built around an IInteractable interface, with separate handling for press-versus-hold interactions and conditions. The goal is to keep player interaction code flexible enough to cover common game objects like doors, chests, and terminals without turning the system into a pile of object-specific checks.

For developers, the useful part is the decoupling: the interactor can query behavior through a shared contract instead of knowing what kind of object it is touching. That makes it easier to add new interactables later, swap out behavior, and keep the player controller from accumulating one-off branches as the project grows.

The walkthrough is framed as a clean architecture example rather than a one-off trick, which makes it relevant to teams trying to keep interaction systems maintainable in larger Unity projects. The source code is available, along with a short breakdown of the interface, a door implementation, and the interactor itself.

This is the kind of pattern that tends to pay off once multiple designers and programmers start adding interactables at the same time. The exact condition system is intentionally lightweight, but the structure is what matters: one contract, many behaviors, and less friction when the game’s interaction rules inevitably expand.

“Build a scalable unity interaction system using interfaces.”

— git-amend · Core framing of the tutorial
Original source
Watch on git-amend
At a glance
what
A Unity tutorial shows how to build press-vs-hold interactions with conditions using an interface-based interaction system.
who
git-amend / Adam Myhre presents the walkthrough and source code.
when
Published as a tutorial video with sections at 0:00, 2:01, and 4:08.
impact
Helps programmers build scalable interactable systems for doors, chests, terminals, and similar objects.
Signal Positive

Useful architecture pattern for scalable Unity code

Discuss

Follow Unity updates

See relevant stories in your personalized news feed.

Sign in to follow

Continue on GameDev.net

Useful next steps related to this story.

Game development news without the noise

One useful weekly briefing. No daily flood.

Sending your confirmation email…

Discussion

Loading comments...

Recommended resources

Game Engines

See full guide
Unreal Engine 5 Best Practices cover
Editor pick

Unreal Engine 5 Best Practices

Amazon · Book

Written by multi-award-winning Unreal generalist Tyson J. Butler-Boschma, Founder and Creative Director of Toybox Games Studios, this book addresses common challenges you face when advancing your expertise in lighting, environment design, and cinematic storytelling.

GameDev.net may earn a commission if you purchase through these links. This helps fund the site at no extra cost to you.

GameDev.net may earn a commission if you purchase through these links. This helps fund the site at no extra cost to you.