← Keyline on 4ssets Quick Start Manual Live demo ▶

Keyline — Quick Start

An outline on screen in ten minutes. Everything else is in the Manual.

1 Import and open the demo

Import the package — it lands in Assets/4ssets/Keyline/ — and wait for the compile. There is no renderer feature to add, no volume to author and no layer to reserve.

Then open Assets/4ssets/Keyline/Demo/Demo.unity and press Play. Ten chapters, and the fastest way to see what the asset does. Keys 10 switch chapters, H hides the panel.

Both URP and HDRP ship in this one package. Which SubShader compiles is decided by the pipeline tag; the demo retargets its own materials on first load, so nothing turns magenta.

2 Your first outline

That is the whole setup. The object has an outline now.

The Keyline Outline component
Four passes, four profile slots. A slot with no profile draws nothing — which is why three of them can stay empty until you want them.

3 The four passes

One component draws up to four things, each with its own switch and its own profile:

Mainthe rim, where the object is visible — the ordinary outline
X-Raythe rim, only where the object is behind something
Fillthe object's own surface — damage flashes, gauges, dissolves
X-Ray Fillthe surface, only where the object is hidden
The four passes, one per quadrant
The same object, one pass at a time. Each carries a complete profile, so "its own style" means its own everything.

4 Drive it from code

using FourSsets.Keyline;

var outline = target.GetComponent<KeylineOutline>();

outline.MainOutlineEnabled = true;      // switch the rim on
outline.Color = Color.red;              // recolour it
outline.Width = 0.04f;                  // metres, in World width mode
outline.XRayEnabled = true;             // show it through walls too
Go through the component, not the profile. A profile is a shared asset: a hundred objects using one profile are using one object in memory, so outline.Settings.color = red turns all hundred red — and in the editor the change survives play mode. outline.Color = red forks the profile into a copy this object owns before writing. That is on by default, and it is the one thing worth knowing on day one.

5 Thirteen components you do not have to write

Runtime/Recipes/ holds the arrangements people usually end up writing themselves: hover, click selection, trigger and proximity highlights, damage flashes, gauges painted on the model, impact and scan waves, materialising, squad highlighting, through-walls markers, blink.

They are ordinary components written against the same public API you have. Add Keyline ▸ Highlight (arbiter) plus a collider to a prop, drop Keyline ▸ Pointer Highlight (scene) anywhere in the scene, and hovering works — one raycast per frame for the whole scene, nothing registered, nothing wired.

A gauge drawn on the model
Fill Gauge: a level painted on the object rather than floating over its head. One shader parameter, so it costs the same at any value.