Home › How do I…? › How to create a custom highlight style

How to create a custom highlight style

Advanced Framework Pro keeps hover feedback in its own class, BPC_Highlight. Derive from it, override start and end, and set it as Highlight Class on any interaction component. By the end of this you will have your own hover feedback style, usable by any interaction.

At a glance

BPC_Highlight_<Yours>   parent BPC_Highlight
├─ StartHighlight       override
├─ EndHighlight         override
└─ UpdateColor          override, if the effect is colour-driven
Any interaction component › Highlight Class = BPC_Highlight_<Yours>
Shipped styles: BPC_Highlight_Material, BPC_Highlight_MeshCopy, BPC_Highlight_PostProcess

Steps

  1. Create a Blueprint deriving from BPC_Highlight.
  2. Override StartHighlight and EndHighlight with your effect.
  3. Override UpdateColor if your effect is colour-driven.
  4. Set your new class as Highlight Class on any interaction component.
The three shipped highlight styles compared
AFS_Core_Highlight_styles.pngThe three shipped highlight styles compared
The three shipped highlight styles compared

Notes

The base class handles the lifetime for you: TickHighlight is called every frame while hovering, and EndHighlight fires automatically once those calls stop. You never need to detect unhover.

Look at the three shipped styles for reference — BPC_Highlight_Material drives material parameters, BPC_Highlight_MeshCopy spawns duplicate geometry, and BPC_Highlight_PostProcess uses a shared stencil-based outline.