---
title: AFS_Core_Highlight
product: Advanced Framework Pro
version: 1.0
engine: Unreal Engine 5.8
updated: 2026-10-05
canonical: https://docs.human-codeable.com/plugins/afs-core-highlight.html
---

System

# AFS_Core_Highlight

Hover feedback in three interchangeable styles — material parameter, mesh copy and shared post-process outline — spawned on demand by interactions.

#### What it gives you

- Three highlight styles with different cost and appearance
- Automatic lifetime: no unhover event to handle
- Shared stencil pooling for the post-process style

#### Requires

None

#### Required by

None

6 assets24 API members

## Description

Highlighting is deliberately not built into interactions. An interaction names a **Highlight Class** and the framework spawns it on first hover — so an object that is never hovered never pays for the component.

The three styles trade cost against flexibility. The material style writes parameters on the object's own material and is cheapest. The mesh-copy style duplicates the geometry under a highlight material, for objects whose materials you do not control. The post-process style assigns a custom depth stencil and draws a true outline through a shared full-screen pass, pooling stencil indices by colour.

Lifetime is handled by a timeout rather than by explicit events: `TickHighlight` is called each frame while hovering, and the highlight ends automatically once the calls stop.

## Setup

1. Enable `AFS_Core_Highlight`.
2. On any interaction component, set **Highlight Class** and **Highlight Color**.
3. For the post-process style, confirm Custom Depth-Stencil is enabled in Project Settings.

Warning

The `Engine.ini` that enables custom depth ships in `AFS_Core_Snapping`, not in this plugin. If you are using highlighting without snapping, set **Custom Depth-Stencil Pass** to *Enabled with Stencil* under Project Settings, Rendering yourself — otherwise the post-process style silently draws nothing. The other two styles are unaffected.

[![The three styles on identical objects](../images/AFS_Core_Highlight_styles-1600.webp?v=1c31116d)](../images/AFS_Core_Highlight_styles-1600.webp?v=1c31116d)

The three styles on identical objects

## Usage

### Choosing a style

| Style | Use when |
|---|---|
| `BPC_Highlight_Material` | You control the object's material. Cheapest. |
| `BPC_Highlight_MeshCopy` | You cannot modify the material. |
| `BPC_Highlight_PostProcess` | You want a true outline and can afford the pass. |

### Limiting which meshes highlight

Tag the meshes and set **Highlight Tag** on the interaction. Leave it empty to highlight everything.

### Changing colour at runtime

Call `UpdateHighlightColor` on the interaction component.

## Key properties

| Property | When to change |
|---|---|
| `Highlight Color` | Per interaction, to signal type or state |
| `Highlight Tag` | To restrict which meshes respond |
| `Parameter Color` / `Parameter Highlight` | On the material style, to match your material's parameter names |
| `Sound Start` / `Sound Stop` | Hover feedback |

## Extending

See [Custom highlight style](../workflows/custom-highlight-style.html). Derive from `BPC_Highlight` and override `StartHighlight`, `EndHighlight` and `UpdateColor`.

## Performance notes

Performance

On mobile and standalone headsets prefer the material style. The post-process style costs a full-screen pass and requires Custom Depth-Stencil.

## Example map

`Map_Examples_Highlight` shows all three styles side by side on identical objects.

## Troubleshooting

**Post-process highlights do not draw.** Custom Depth-Stencil is disabled in Project Settings → Rendering.

**The material style does nothing.** The object's material does not expose the parameter names set in **Parameter Color** and **Parameter Highlight**.

## API reference

Every blueprint asset in this plugin. Expand an asset to see its members.

### Components

**BPC_Highlight**9 members

extends `ActorComponent`

Base highlight component, the visual half of hovering. Carries the highlight colour, the start and stop sounds and the tag deciding which meshes are affected, and ends the highlight once Tick Highlight stops arriving. An interaction adds one for you from its Highlight Class, so choose the material, mesh-copy or post-process variant there, or subclass this.

| Kind | Name | Signature | Description |
|---|---|---|---|
| var | `Highlight Color`Color | `LinearColor` | Colour used to highlight the object. Normally supplied by the interaction component that spawns this highlight. |
| var | `Sound Start`Sound | `SoundBase` | Sound played when highlighting begins. |
| var | `Sound Stop`Sound | `SoundBase` | Sound played when highlighting ends. |
| var | `Highlight Tag`References | `name` | Component tag limiting which meshes on the owner are highlighted. Leave empty to highlight every mesh. |
| fn | `EndHighlight` | `()` | Ends the highlight effect and plays the stop sound. Override in a subclass to implement a new highlight style. |
| fn | `StartHighlight` | `()` | Begins the highlight effect and plays the start sound. Override in a subclass to implement a new highlight style. |
| fn | `getComponentsToHighlight`Default | `(out MeshComponents: MeshComponent[])` | Returns the mesh components this highlight applies to, honouring the Highlight Tag filter. |
| event | `TickHighlight` | `()` | Keeps the highlight alive for this frame. The highlight ends automatically once these calls stop arriving, so hovering needs no explicit end event. |
| event | `UpdateColor` | `(HighlightColor: LinearColor)` | Changes the highlight colour while the highlight is running. |

**BPC_Highlight_Material**6 members

extends `BPC_Highlight`

Highlight drawn through the owner's own materials, fading a scalar parameter on every dynamic material instance of the tagged meshes and writing the colour into a vector parameter. Name it as an interaction's Highlight Class when the meshes already carry highlight parameters, and set the two parameter names to match the material.

| Kind | Name | Signature | Description |
|---|---|---|---|
| var | `Parameter Color`Settings | `name` | Name of the colour parameter on the object's material that this highlight writes to. |
| var | `Parameter Highlight`Settings | `name` | Name of the scalar parameter on the object's material that this highlight toggles. |
| event | `StartHighlight` | `()` | Begins the highlight effect and plays the start sound. Override in a subclass to implement a new highlight style. |
| event | `EndHighlight` | `()` | Ends the highlight effect and plays the stop sound. Override in a subclass to implement a new highlight style. |
| event | `SetHighlight` | `(Set: bool)` | Sets the highlight parameter directly, bypassing the start and stop transitions. |
| event | `UpdateColor` | `(HighlightColor: LinearColor)` | Writes a new colour into the material's colour parameter. |

**BPC_Highlight_MeshCopy**2 members

extends `BPC_Highlight`

Highlight drawn as a ghost duplicate of the owner's meshes, spawned as a mesh copy helper in the hologram material, leaving the owner's own materials untouched. Name it as an interaction's Highlight Class for objects whose materials cannot carry a highlight parameter.

| Kind | Name | Signature | Description |
|---|---|---|---|
| event | `EndHighlight` | `()` | Ends the highlight effect and plays the stop sound. Override in a subclass to implement a new highlight style. |
| event | `StartHighlight` | `()` | Begins the highlight effect and plays the start sound. Override in a subclass to implement a new highlight style. |

**BPC_Highlight_PostProcess**3 members

extends `BPC_Highlight`

Highlight drawn as an outline by a post-process pass. Finds the highlight post process actor in the level, spawning one if there is none, and asks it for a stencil index matching the highlight colour. Name it as an interaction's Highlight Class for a crisp outline; it needs custom depth, and only a few distinct colours can be live at once.

| Kind | Name | Signature | Description |
|---|---|---|---|
| fn | `getPostProcess`Default | `(out PostProcess: BP_PostProcess_Highlight)` | Returns the shared post-process highlight actor, creating it if this is the first highlight in the level. |
| event | `StartHighlight` | `()` | Begins the highlight effect and plays the start sound. Override in a subclass to implement a new highlight style. |
| event | `EndHighlight` | `()` | Ends the highlight effect and plays the stop sound. Override in a subclass to implement a new highlight style. |

### Helper

**BP_Helper_MeshCopy_Highlight**0 members

extends `BP_Helper_MeshCopy`

Ghost duplicate of a highlighted actor's meshes, spawned by the mesh-copy highlight. It adds nothing to the mesh copy helper it inherits from and exists so the highlight has a class of its own to spawn and to restyle; subclass it to change how the ghost looks.

No editor-visible members; this asset configures defaults only.

### PostProcess

**BP_PostProcess_Highlight**4 members

extends `Actor`

Level actor supplying the outline pass that post-process highlights are drawn with. It hands out custom depth stencil values, one per requested colour, writes those colours into the outline material and frees them again as the requesting objects go away. The first highlight that needs it spawns one, so place it yourself only to control where it sits or to change its post-process settings.

| Kind | Name | Signature | Description |
|---|---|---|---|
| fn | `getOutlineMaterial` | `(out OutlineMaterial: MaterialInstanceDynamic)` | Returns the dynamic material instance driving the outline post-process, so colours can be updated at runtime. |
| fn | `FreeUpUnusedStencil` | `()` | Reclaims stencil indices no longer referenced by any object, keeping the limited stencil range available. |
| fn | `ReleaseStencil` | `(Reference: Object)` | Releases the stencil previously reserved for the given object. |
| fn | `RequestStencilForColor`Default | `(RequestColor: LinearColor, Reference: Object, out Stencil: int)` | Reserves a custom depth stencil index for the requested outline colour and returns it. Colours are pooled, so objects sharing a colour share a stencil. |
