A complete, designer-friendly interaction system for Unity. Add an interact key to any object in your scene (doors, pickups, levers, buttons, and more) without writing scripts.Snog's Interaction System gives you a polished, production-ready interaction layer you can drop into any Unity project. Whether you're building a first-person adventure, a top-down RPG, or a puzzle game, everything is designed to work immediately and stay out of your way.Get started in minutesAdd PlayerInteractor to your player, assign an InteractionSettings asset, drop a prefab in your scene, and you're done. The built-in Interactable Scaffolder generates a fully typed C# script and matching prefab — complete with mesh, collider, material, and layer — from a single editor window. No boilerplate, no wiring.Every interaction type covered• Door — animated rotation with hinge pivot, open/close toggle, configurable angle and speed.• Pickup — destroys itself on interact, logs item ID and amount.• Lever — fires an Animator trigger, tracks on/off state.• Button — one-shot press with optional audio, stays pressed.• Readable — displays text on interact, useful for notes and signs.• Scene Loader — loads a scene by name, single or additive mode.• Save Point — stub ready to wire into your own save system.• Custom — blank skeleton you can extend however you need.Condition systemGate any interaction behind scene-object conditions with no code required. Add RequiresConditions to your interactable, then add condition components alongside it. All conditions are MonoBehaviour-based so they reference scene objects natively — no ScriptableObject assets to manage.• GameObjectActiveCondition — passes when a target GameObject is active or inactive.• ComponentEnabledCondition — passes when a target Behaviour is enabled or disabled.• InvertCondition — inverts any sibling condition.Set a Failure Reason on any condition to show contextual text in the prompt when the interaction is blocked (e.g. "The generator must be on first"). Create your own conditions by inheriting InteractionCondition.Animated HUD promptThe built-in InteractionPromptUI supports three independently toggleable animations: fade, scale (pop), and slide. All three share a single easing curve so they always move in sync. The prompt automatically cross-fades when the player looks from one interactable to another. Fully replaceable — implement IPromptDisplay on any MonoBehaviour to use your own UI framework.Press or holdSet a global press or hold mode in InteractionSettings, then override it per-object. Per-object hold duration override included. Hold progress drives a fill image on the HUD automatically.C# events for zero-coupling integration• OnFocusChanged — fires when the player aims at or away from an interactable.• OnInteracted — fires after each successful interaction.• OnInteractionFailed — fires when the player presses the key while an object is blocked. Use this for locked-door audio, tutorial nudges, or UI feedback.Interaction lockCall SetInteractionLocked(true) at the start of an animation and SetInteractionLocked(false) when it finishes to prevent re-triggering mid-playback. The Live Status panel in the inspector shows the lock state in real time during Play Mode.One-click Quick ActionsThe interactable inspector includes one-click buttons that add a response component and wire it to OnInteract automatically: Play Audio, Animator Trigger, Set Active, Toggle Active, Enable/Disable Component, Toggle Component, Debug Log, Invoke Event, Reload Scene, Quit Application.Fully extensible• IInteractionDetector — swap the detection strategy. Built-in options: forward SphereCast and ProximityDetector (nearest in radius). Implement your own for VR, click-to-interact, or anything else.• IPromptDisplay — replace the HUD with any UI framework. World-space prompts, controller glyphs, whatever you need.• ICustomPrompt — supply rich prompt data per-object: icons, unavailable-state labels, full-sentence prompts.New Input System + Legacy InputAssign an InputActionReference for full New Input System support, or leave it empty to use the KeyCode fallback in InteractionSettings. The interact key is exposed directly on the PlayerInteractor inspector so you never have to navigate to a settings asset just to change a key binding.Included• PlayerInteractor — main driver, attach to your player.• InteractionPromptUI — built-in HUD with fade, scale, and slide animations.• InteractionSettings — ScriptableObject, one asset per project.• BaseInteractable — abstract convenience base class.• Interactable Scaffolder — editor window for code and prefab generation.• RaycastDetector + ProximityDetector — two built-in detection strategies.• 3 built-in conditions + condition base class.• 11 Quick Action components.• InteractionDebugOverlay — runtime HUD for debugging (F9 toggle, safe in builds).• KeycardDoorInteractable sample — demonstrates ICustomPrompt, icons, and unavailable-state labels.• Full XML documentation on all public API.SupportFor bug reports and feature requests, snogdev@gmail.comRequirements• Unity 2021.3 LTS or later• TextMeshPro (for the built-in prompt UI)• New Input System package — optional, falls back to legacy KeyCode input if absentCompatibility• Universal Render Pipeline (URP) — fully compatible• Built-in Render Pipeline — fully compatible• HDRP — compatible (sample material uses URP/Lit shader; swap as needed)• 2D projects — not designed for 2DArchitecture• Interface-driven — PlayerInteractor talks to IInteractable, IPromptDisplay, and IInteractionDetector. Every layer is replaceable without touching the core.• No singletons, no static state — multiple PlayerInteractor instances work independently (split-screen ready).• Zero per-frame allocations — condition evaluation, detection, and the prompt UI all avoid GC pressure on the hot path.• Editor only where it belongs — all editor code is inside #if UNITY_EDITOR guards or Editor/ assembly definitions.Performance notes• Built-in detection uses Physics.SphereCast — one physics call per frame per PlayerInteractor.• ProximityDetector uses Physics.OverlapSphereNonAlloc with a per-instance buffer.• RequiresConditions caches GetComponents results and only rebuilds on component add/remove.• InteractionPromptUI drives a single CanvasGroup alpha and RectTransform — no layout rebuild per frame.ScriptsRuntime: 37 scripts across Core, Data, Helpers, Conditions, Detection, Interfaces, and Debug folders.Editor: 5 custom inspectors + 1 editor window (Interactable Scaffolder).Samples: KeycardDoorInteractable — demonstrates the full ICustomPrompt pattern with icons and unavailable-state labels.Tested Unity versions• Unity 2021.3 LTS• Unity 2022.3 LTS• Unity 6 (6000.0)SupportFor bug reports and feature requests, snogdev@gmail.com




