Ways to interact
Every way a player can find and use objects, and how to switch each one on. Everything here works with both input systems, keyboard, mouse, gamepad and touch, and costs no garbage per frame.
How an object is used #
Set Mode on the object's Interactable:
| Mode | The player... | Settings |
|---|---|---|
| Press | presses the button once | |
| Hold | keeps the button down until the ring fills | Hold Duration |
| Double Tap | presses twice quickly | Tap Window |
| Mash | presses again and again (a stuck door, a winch) | Mash Count, Tap Window (the count drains when they slow down) |
The prompt says how ("Hold to Open Door", "Double-tap to Open Door", "Tap repeatedly to Force Door"); change those words on the prompt (Hold Format, Double Tap Format, Mash Format). Players can turn Mash into Hold and Double Tap into Press, and holds into toggles, in the accessibility settings.
Several actions on one object #
Add Interaction Actions (Several Per Object) next to the Interactable. Each action has a verb, how it is triggered and what it runs (one of the object's parts, an event, or both):
- Press and Hold on the same button: tap to open, hold to lock. A tap is letting go within Tap Time.
- Own Key: its own key and gamepad button (F to kick, Q to knock).
- Menu Only: only in the radial menu.
Menu: Stacked lists the extra actions under the prompt, each as a small prompt of its own with its key cap ("[F] Kick", "[E] Hold to Lock"). Menu: Radial opens a ring of all actions when the player holds the button: they point with the mouse or a stick and let go to pick (the picked slice lights up in the theme's accent colour); a tap runs the first action. Give an action an Icon to show it beside the verb in the ring. Both take the prompt's look: the theme's colours, key caps and font, its Shows setting (key and words, key only, words only) and the Prompt Size slider. List Scale and Radial Size set their size next to the prompt. Turn Draw off and use the component's events (or Get List Views) to show your own menu. In multiplayer the host runs the action the player picked.
Grab and move by hand #
Add Drag Interaction (Grab And Move) to a door, drawer, lever, valve or wheel. Players hold the button on it and move the mouse (or the right stick) to swing it, pull it or turn it, as far as they like; when they let go it settles open or closed. A quick tap still opens and closes it as usual. Physics doors keep their swing. Set the speed per object (Degrees Per Pixel, Metres Per Pixel) and flip the direction with Invert.
Without pressing anything #
- Auto Interact Zone: a trigger area that uses objects when a player walks in (automatic doors, pickups you walk over) and optionally when they leave (close the gate behind them). Can be limited to players who turned on Auto Interact in the accessibility settings.
- Gaze Interaction Input: looking at an object for a moment uses it (Dwell Time). Set it as the Interactor's input and give it your key input as Also Use, so both work. Its On Progress event drives a filling ring.
Mouse, touch and phones #
- Pointer Discovery (Mouse And Touch) finds the object under the mouse, or under the finger that tapped it (touch screens have no hover, so a tapped object stays picked for a few seconds). 3D and 2D.
- Pointer Interaction Input (Click And Tap): clicking or tapping the object uses it; holding works for Hold objects.
- Interaction Touch Button: an on-screen button for phones that shows the action ("Open") and works as the interact button. Shown on touch devices only by default. Call Pointer Down / Pointer Up from your own UI button instead if you like.
- On a touch screen the prompt says "Tap to Open Door" (or "Touch and hold to...") and shows no key.
Rebinding #
- Key Interaction Input: call Listen For Key from your settings menu; the next key or gamepad button becomes the interact button (Escape cancels). Set Remember Binding As to keep it between sessions.
- Interaction Rebinding (Input System): rebinds the interact action's keyboard or gamepad binding, saves it, and can reset it.
Prompts show the new button at once.
Finding what the player means #
- Look Ray Discovery: a ray from the camera. Cone Angle adds aim assist: when the ray just misses, the best object within that angle is picked (never through walls). Angle Weight decides how much being off centre counts.
- Proximity Discovery (third person, top-down): the nearest object around the player. Max Angle limits it to what is in front; Require Line Of Sight skips objects behind walls. The 2D version has line of sight too.
- Sticky Focus Time on the Interactor keeps the current object a moment longer, so the prompt doesn't flicker at the edge of range.
Seeing what can be used #
- Interaction Highlighter: marks the object being looked at with an outline, a tint, a rim glow, a pulse, or nothing, in Built-in, URP and HDRP, without touching your materials. The look comes from the theme (each preset has one) or a Highlight Style asset; objects that can't be used get the blocked colour. An Interaction Appearance turns it off for one object.
- Interaction Markers (Nearby And Off Screen): a dot or icon over each usable object near the player, fading with distance, and arrows at the edge of the screen to important objects that are off screen. An Interaction Marker on an object gives it its own icon, colour and label, makes it important, or hides its marker.