Highlighting vs Selection
intermediate conceptsHighlight 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
| Feature | Highlighting | Selection |
|---|---|---|
| Trigger | Mouse hover, proximity, or scripting | Mouse click or scripting |
| Duration | Temporary — ends when trigger stops | Persistent — stays until deselected |
| Profile | Uses the object’s main Highlight Effect profile | Uses a separate Selected Profile (if assigned) |
| Multiple objects | Only 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:
| Component | Scope | Best for |
|---|---|---|
| Highlight Manager | Scene-wide. Manages all objects with a HighlightEffect component via a single raycast. | Scenes where most objects share the same interaction rules. |
| Highlight Trigger | Per-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.
Setting Up Selection
- Add a Highlight Manager (scene-wide) or a Highlight Trigger (per-object) to handle input detection.
- 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).
- 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.
- 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.
| Option | Component | Type | Description |
|---|---|---|---|
| Select On Click | HighlightManager / HighlightTrigger | bool | When enabled, clicking the object selects it. |
| Toggle | HighlightManager / HighlightTrigger | bool | When enabled, clicking a selected object deselects it. Without it, clicks accumulate selections. |
| Single Selection | HighlightManager / HighlightTrigger | bool | Only one object can be selected at a time. When a different object is clicked, the previous selection is cleared. |
| Keep Selection | HighlightManager / HighlightTrigger | bool | Preserves selection when the pointer leaves the object. |
| Selected Profile | HighlightManager / HighlightTrigger | HighlightProfile | Profile applied while the object is selected (and not highlighted). |
| Selected And Highlighted Profile | HighlightManager / HighlightTrigger | HighlightProfile | Profile applied while the object is both selected and highlighted. |
| Highlighted | HighlightEffect | bool (property) | Current highlight state. Set via effect.highlighted = true or SetHighlighted(true). |
| Is Selected | HighlightEffect | bool (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
- Settings Reference — full list of all Highlight Effect options
- Scripting Support — complete API reference
- FAQ — common questions
Suggest an improvement
Help us improve this documentation page.