Highlighting vs Selection

intermediate concepts

Highlight Plus · Core Concepts

Highlight Plus distinguishes between two modes of highlighting: Highlighting (hover/proximity) and Selection (click/toggle). Understanding the difference lets you build intuitive selection systems for your game.

Highlighting vs Selection

FeatureHighlightingSelection
TriggerMouse hover, proximity, or scriptingMouse click or scripting
DurationTemporary — ends when trigger stopsPersistent — stays until deselected
ProfileUses the object’s main Highlight Effect profileUses a separate Selected Profile (if assigned)
Multiple objectsOnly one object highlighted at a time (by default)Multiple objects can be selected simultaneously

Highlight Manager vs Highlight Trigger

There are two ways to enable automatic highlighting and selection in your scene:

ComponentScopeBest for
Highlight ManagerScene-wide. Highlights the object under the pointer with a single raycast or, in Proximity mode, the nearest object around the player.Scenes where most objects share the same interaction rules.
Highlight TriggerPer-object. Each object controls its own input detection (raycast, collider events, or volume-based).Objects that need individual trigger settings, custom cameras, or volume-based proximity detection.

You can use either one or combine both. HighlightTrigger takes priority on the objects where it is attached.

Proximity Detection

Set the Highlight Manager’s Detection Mode to Proximity to highlight the nearest object around the player instead of the object under the pointer, for example to show what can be picked up. Available since version 34.5.

OptionDescription
Proximity CenterCenter of the search, usually the player or its camera. If empty, the camera is used. Colliders on this object, its parents and its children are ignored.
Proximity RadiusMaximum distance from the center to an object.
Proximity View AngleOnly objects within this angle from the forward direction of the center are highlighted. 360 means all directions.
Layer MaskLayers of the objects that can be highlighted. Use a dedicated layer for interactable objects: with Everything, the floor and walls near the player can be highlighted.
Line Of Sight BlockersObjects on these layers between the center and an object prevent it from being highlighted. Set it to Nothing to disable the check.

Only the nearest object is highlighted, and only objects with a 3D collider are detected. To exclude an object, enable Ignore on its HighlightEffect or return false from OnObjectHighlightStart, and the next nearest object is highlighted instead. Read highlightedObject to know which object is highlighted, for example to pick it up with a key. Demo scene 7 (URP edition) shows this setup.

Setting Up Selection

  1. Add a Highlight Manager (scene-wide) or a Highlight Trigger (per-object) to handle input detection.
  2. Create a Selection Profile — right-click in the Project window: Create > Highlight Plus > Highlight Profile. Configure the desired selection appearance (e.g., thicker outline, different color).
  3. Assign the profile — on the Highlight Manager (or Highlight Trigger), assign your profile to the Selected Profile field. Optionally also assign Selected And Highlighted Profile for the combined state.
  4. Enable click-to-select — tick Select On Click on the same component.

Selection Options

The selection feature is configured on HighlightManager or HighlightTrigger, not on the per-object HighlightEffect component.

OptionComponentTypeDescription
Select On ClickHighlightManager / HighlightTriggerboolWhen enabled, clicking the object selects it.
ToggleHighlightManager / HighlightTriggerboolWhen enabled, clicking a selected object deselects it. Without it, clicks accumulate selections.
Single SelectionHighlightManager / HighlightTriggerboolOnly one object can be selected at a time. When a different object is clicked, the previous selection is cleared.
Keep SelectionHighlightManager / HighlightTriggerboolPreserves selection when the pointer leaves the object.
Selected ProfileHighlightManager / HighlightTriggerHighlightProfileProfile applied while the object is selected (and not highlighted).
Selected And Highlighted ProfileHighlightManager / HighlightTriggerHighlightProfileProfile applied while the object is both selected and highlighted.
HighlightedHighlightEffectbool (property)Current highlight state. Set via effect.highlighted = true or SetHighlighted(true).
Is SelectedHighlightEffectbool (property)Current selection state. Read or set via effect.isSelected.

Scripting Selection

Selection is driven by HighlightManager at the scene level. See Scripting Support — HighlightManager Selection Handling for the full API and code samples.

Quick reference:

// Through the Manager (recommended)
HighlightManager.instance.SelectObject(transform);
HighlightManager.instance.ToggleObject(transform);
HighlightManager.instance.UnselectObject(transform);
HighlightManager.instance.UnselectObjects();

// Direct property on the effect (no manager needed)
HighlightEffect effect = GetComponent<HighlightEffect>();
effect.isSelected = true;   // select
effect.isSelected = false;  // deselect
bool selected = effect.isSelected;

Tips

  • If no Selected Profile is assigned, the selected state uses the same appearance as the highlight — only the persistence differs.
  • Use different colors or outline widths in the Selection Profile to make it visually distinct from hover highlighting.
  • Enable Toggle to let a second click on a selected object deselect it. Combine with Single Selection on HighlightTrigger to allow only one selection at a time.
  • Selection state persists across highlight/unhighlight events — a selected object keeps its selection appearance even when not being hovered.

Next Steps

Was this page helpful?