How to Use
beginner conceptsHighlight Plus 2D · Core Concepts
Different ways to add and configure highlight effects on your 2D sprites.
Single Sprite Setup
- Select a sprite in your scene.
- Add the HighlightEffect2D component (Add Component > Highlight Effect 2D).
- Configure the desired effects (outline, glow, overlay, etc.) in the Inspector.
- Optionally add HighlightTrigger2D to activate effects on pointer hover. A Collider2D must be present on the sprite.
Note: Adding
HighlightTrigger2D automatically adds HighlightEffect2D if it is not already present.
Automatic Manager
- Go to GameObject > Effects > Highlight Plus 2D > Create Manager.
- Configure the default effect settings on the HighlightManager2D component.
- Any sprite with a collider will highlight automatically on pointer hover.
Tip: If a sprite already has its own
HighlightEffect2D component, the manager respects those per-sprite settings instead of the defaults.
Scripting Activation
After adding HighlightEffect2D to your sprite, control highlights from code:
using HighlightPlus2D;
HighlightEffect2D effect = GetComponent<HighlightEffect2D>();
effect.highlighted = true;
Ignoring Specific Sprites
Add a HighlightEffect2D component to the sprite and enable the Ignore checkbox under the Highlight section. This is useful when effects are applied to a parent with Include = Children but one child should be excluded.
Group Highlighting
Use the Include setting to control whether children are highlighted together with the parent:
| Include Mode | Behavior |
|---|---|
| Only This Object | Only this sprite receives effects. |
| Children | This sprite and all children are highlighted as a group. |
| Root to Children | Effects propagate from the root through the entire hierarchy. |
Note: If a child has its own
HighlightEffect2D component, it will not be included in the parent group.
Exclusive vs Grouped Outlines
By default, outlines of overlapping sprites merge together. To keep outlines independent:
- Option A: Enable the Exclusive toggle under the Outline section on the specific sprite.
- Option B: Add
HighlightGroup2Dto sprites and assign a group number. Sprites in the same group merge outlines, but do not merge with other groups. Group 0 has no special behavior.
Was this page helpful?
Suggest an improvement
Help us improve this documentation page.