Keyline: Outline, Highlight, X-Ray, Fill · URP HDRP 2D 3D

▶ TRY IT RIGHT NOW — LIVE WEBGL DEMO

ADD ONE COMPONENT.

ASSIGN A PROFILE.

THE OBJECT HAS AN OUTLINE.

​

WHAT YOU GET

  • Renderers — MeshRenderer, SkinnedMeshRenderer and SpriteRenderer. One profile format across all three.
  • Pipelines — URP 17.x and HDRP 17.x in one package, chosen automatically. Built-in is NOT supported.
  • Four passes per object — outer rim, X-Ray rim for when it is hidden, interior fill, X-Ray interior fill. Each carries its own complete profile, and a mesh adds two optional Cutout Overlays.
  • Fifteen styles — Solid, Neon, Halo, Sketch, Pattern, Double, Electric, Rainbow, Gradient, Frost, Lava, Smoke, Crystal, Water, Fire. 84 pattern textures included.
  • Three ways to measure width — world units, constant screen pixels, or whole texels of the sprite for pixel art.
  • X-Ray that chooses what it shows through — a layer mask per outline, so one target reads through a wall and not through the floor.
  • One silhouette from several objects — by group, by parent, or automatically the moment two outlines touch.
  • An optional soft edge, with a glow that obeys the same depth rule the rim it came from does.
  • Project Features — a switch for every part that costs something. Off means hidden in the Editor, skipped at runtime and stripped from the build, down to the shader variants. A line under every rendering pass says whether it is actually working, not merely switched on.
  • 2D — outlines measured from a distance field, so they follow what is drawn; pixel-art fields on the texel grid; Sprite Atlas (Full Rect, no rotation); a field per AnimationClip frame; sorting-order occluders, so X-Ray works with no depth buffer.
  • Hard 3D cases — flat leaves, single-sided cards and models built double-sided, thin prongs, cutout from material alpha, objects that pass through one another, skinned meshes with no per-frame re-bake. No expand mode to pick.
  • Fourteen ready components — hover, click selection, trigger and proximity highlight, damage flash, fill gauge, impact wave, scan wave, reveal, group highlight, blink, X-Ray when hidden, distance fade, and an arbiter that stops them fighting.
  • Eight blend modes per pass, a per-pass draw config, a cheaper Mobile Solid profile for mobile, and scripting access to all of the above.
  • Never touches your material. No shader swap, no re-authoring. Remove the component and the object is exactly as it was.
  • Fast — 400 outlined objects in one Merge Group add 28 SetPass calls to the frame, and the outline runtime allocates nothing per frame.
  • Included — a ten-chapter demo scene, a 17-section offline HTML manual with 41 illustrations, a quick start, a searchable API Reference, a changelog, and full C# source.

​

NEW IN 1.3.0

  • Project Features. Switch off every part you do not use. Hidden in the Editor, skipped at runtime, stripped from builds. Presets, Detect From Project, and a Setup window after import.
  • Faster. The outline shader is back in the SRP Batcher. Soft Edge cost grows with the outline count. Crowds can share a stencil. A pooled object keeps its outline.
  • Cleaner hard meshes. Seams stay closed. Double-sided cards, leaves and cartons are outlined all the way round. Every hull decides per face. Expand Mode is gone.
  • Geometry on the object. One profile outlines a crate and a leaf. Components saved with 1.2.0 take their hull settings over.
  • The outline follows the object. Its layer, Hide With Renderer, LOD Groups, and the floor no longer cuts the rim.
  • Distance Fade and scripting. Fade by camera distance. BlendTo, per-part pass switches, AdoptChild, and a searchable API Reference.
  • Compatible with 1.2.0. Scenes, prefabs and profiles load as they are. Re-bake meshes saved with Bake for Runtime.

​

MESHES AND SPRITES

A mesh outline is an inverted hull. A sprite rim is a distance field baked from the artwork: one texture fetch per pixel at any width, holes included. Two components declare occluders where there is no depth buffer. Sprite Atlas needs Full Rect and no rotation; tight packing or rotation falls back to the silhouette and says so once.

​

PIXEL ART

Field Mode also bakes on the texel grid, 8-way or 4-way: square corners, an edge on texel boundaries, width in whole texels at any zoom. Both fields can sit beside one sprite.

​

X-RAY

The layer read is the occluder's, so two objects behind the same wall can differ. Cost does not grow with the number of masks. In 2D, sorting layers decide who occludes; GameObject layers decide which of those an outline may show through.

​

ONE SILHOUETTE

Merge Group, Merge Child Outlines and Merge When Overlapping answer one question. Overlap counts the outline, not only the object. If A is with B and B is with C, all three share one stencil pair.

​

SOFT EDGE

The fade stays in world space. Halo Occlusion keeps it to the rim's depth rule. Glow Outside Only decides whether it may cross the object. Added and removed in one click. Edge Softness at 0 allocates nothing.

​

BUILT FOR HARD CASES

  • Every hull decides per face whether a part is solid or a sheet. Expand Mode is gone. A card, a leaf or a paper carton modelled on both sides is outlined all the way round.
  • Sheet Solidify gives a flat island enough thickness to hold a rim.
  • Cutout from material alpha outlines the shape the texture defines, not the one the mesh has — foliage cards, decals, sprites on quads.
  • Clip At Intersections removes the band of outline an intruding object leaves where it enters this one.
  • Skinned meshes follow the animation without re-baking per frame.

​

CUSTOMISABLE

A profile is a shared ScriptableObject, about a hundred fields, and the inspector shows only what the style reads. Fifteen ship ready, one per style, plus Mobile Solid. A hundred objects on one profile are one object in memory; the first write that must differ forks a private copy.

​

UPGRADING FROM 1.2.0

Scenes, prefabs and profiles load as they are, and each object takes its hull settings over from its profile. Renamed API keeps working, with [Obsolete] hints. Re-bake meshes saved with Bake for Runtime. The shipped profiles now use Miter Limit 1 and Sheet Solidify Lateral 1. An object with a LOD Group is outlined from one level; switch that feature off to keep every level outlined.

​

UPGRADING FROM 1.0.0

Scenes from 1.0.0 still load. KeylineOccludedXRay still compiles as KeylineXRayWhenHidden. Rim Samples is now the distance field. Edge Softness above 0 cuts the glow with the rim; set Halo Occlusion to Ignore Depth for the old picture.

​

INCLUDED

Ten-chapter demo scene. A 17-section HTML manual with 41 illustrations, a quick start, a searchable API Reference and a changelog, all inside the package and readable offline. No wiki, no video-only explanations.

​

REQUIREMENTS

Unity 6000.3 or newer. URP 17.x and HDRP 17.x.

The Built-in Render Pipeline is NOT supported.

Tested on Windows, Android and WebGL.

Documentation and contact: https://unitycraft.org/4ssets

Example content by Kenney (kenney.nl), licensed CC0 1.0 Universal (public domain dedication); see Third-Party Notices.txt in the package.