Universal Interaction System
Demo ... Platforms ... Touch input isn't included, but you can add it through IInteractionInput ... What's in the box ... - Lever / button: toggle or momentary, with an optional moving handle
by Conquerror
Price History +
Requirements
- Unity 6 (built on 6000.0), 3D projects
- TextMeshPro and Unity UI (both ship with Unity)
- No third-party dependencies
Render pipelines
- Built-in, URP and HDRP
- The highlight uses MaterialPropertyBlock, so materials are never copied
- Demo materials are set up for URP. On another pipeline, convert them with the Render Pipeline Converter
Input
- Input System package, legacy Input Manager, or both
- Keyboard, mouse and gamepad (West button)
- Interact key options: E, F, G, Q, R, T, X, Space, Enter, left or right mouse button
- Custom input through the IInteractionInput interface
Detection
- Camera Raycast: Physics.Raycast, or SphereCast when Cast Radius is above 0 (first and third person)
- Sphere Closest In Front: OverlapSphereNonAlloc with a line-of-sight check (top-down and isometric)
- Layer mask and trigger handling options
- Per-object reach override
Components
- Interactor, Interactable, KeyRing
- Door (rotate or slide), Pickup, SwitchInteractable (toggle or momentary)
- InteractionPromptUI (builds its own prompt, hold ring and crosshair, or uses UI you assign)
- InteractableHighlight
Code
- Full C# source, about 1,100 lines of runtime code
- Namespace: Conquerror.Interaction
- Assembly definitions: Conquerror.Interaction, Conquerror.Interaction.UI, Conquerror.Interaction.InputSystem (compiles only when the Input System is on), Conquerror.Interaction.Editor
- Extend by inheriting Interactable or implementing IInteractable
- C# events on Interactor: FocusChanged, Interacted, InteractFailed, HoldProgressChanged, ItemPickedUp
- C# events on Interactable: Interacted, FocusGained, FocusLost, InteractFailed
- UnityEvents for all of these in the Inspector
- No static state, so it works with Fast Enter Play Mode (domain reload off)
- IL2CPP and code stripping safe
- Detection uses non-allocating physics queries
Demo
- One scene and 10 prefabs: player, room, door, locked door, lever, lamp, crate, key, NPC, treasure
- First-person controller built on CharacterController
Documentation
- Offline HTML guide: quick start, no-code guide, component reference, code examples, troubleshooting and learning links
Platforms
- No platform-specific code. Runs anywhere Unity 6 runs with keyboard, mouse or gamepad input. Touch input isn't included, but you can add it through IInteractionInput
Most games need the same thing sooner or later: walk up to something, see "[E] Open door", press the key, and the door opens. This asset handles that part so you can get back to the rest of your game.
Add Interactor to your player, add Interactable to an object, drop InteractionPromptUI into the scene, and press Play. That's the whole setup. The prompt, the hold ring and the crosshair are built for you at runtime, so there's no UI to put together first.
What's in the box
- Door: swings or slides open, and can be locked behind a key
- Pickup: gets picked up, disappears, and gives the player its item id as a key
- Lever / button: toggle or momentary, with an optional moving handle
- Hold to interact: set a duration and the player holds the key while a ring fills up
- Locked objects: an object asks for a key id, and you choose whether using it takes the key away
- Highlight: tints whatever the player is looking at
- One-shot objects and cooldowns
You don't have to write code
Every interactable has event slots in the Inspector. A lever can open a gate, a crate can reveal a hidden key, and an NPC can start your dialogue tool, all by dragging objects into slots. The documentation has a short guide for people who've never touched C#, with ready-made recipes for the usual puzzles.
If you do write code
Inherit from Interactable and override two methods, or implement IInteractable on any component you already have. Events like Interacted, FocusChanged and ItemPickedUp let your inventory, quest or save system listen in without the interaction code knowing they exist. You get the full source, and the main loop is one file under 300 lines.
First person, third person or top-down
Aim with a camera raycast for first and third person, or switch to "closest thing in front of you" for top-down and isometric games. It works with the new Input System, the old Input Manager, or both, and supports keyboard, mouse and gamepad.
Demo included
A small room with a door, a lever that turns on a lamp, a crate you search for a key, a locked door, an NPC and a hidden treasure. Every object in it is also a prefab you can drag into your own scene.
What it doesn't do
There's no inventory, saving or quest system, on purpose. Those are different in every game, so the asset gives you clean hooks to plug your own into instead of forcing one on you.