Skip to main content

API Reference

The public runtime surface you interact with from game code. Marketing copy aside, these are the components, methods, enums and events that actually ship.

Key components & methods

ComponentMembers you call at runtime
PaintCanvas (base)SetTarget(Paintable) / Target — retarget the canvas · ResetToOrigin() — restore starting textures · Clear() — wipe to background · GetChannel(ChannelDefinition) — resolve a PaintChannel at runtime (populated on MultiChannelCanvas / SimulationCanvas)
PaintToolSwitchInput(InputConfig) — hot-swap the input device · SwitchPaint(DrawConfig) — hot-swap the active brush/fill · PaintDab(Ray) / Stamp() — manual one-shot painting
PaintableTexture Size, Submesh Index; wraps a Renderer (mesh or SkinnedMeshRenderer)
PaintableLinkForwards proxy-collider raycast hits back to a shared Paintable
PaintProgressTrackerProgress, DonePixels, TotalPixels, OnUpdated event; static GlobalProgress, AllReady
PaintEngineEnqueueCommand(ICommand) — enqueue a pooled GPU command

Key enums

EnumValues
ChannelValueTypeColor, Scalar, Normal
ValueSourceConstant, Pressure, Distance, Speed, Time, Direction, Random
Stamp alignmentSurface, View
Draw shapeNone, Circle, Texture
Fill scope (FillMode)Face Directions, Seam, Shape Edge, Triangle
RenderPipelineTypeBuiltIn, URP, HDRP

Blend modes

Blend modes are typed to the channel's value type so an invalid combination can't be selected:

Value typeBlend modes
ColorNormal, Multiply, Add, Min, Max, Screen, Overlay, Soft Light
ScalarNormal, Multiply, Add, Min, Max
NormalLerp, RNM, UDN, Whiteout, Overlay, Max Slope, Subtract

Progress tracking events

PaintProgressTracker reports how much of a channel's paint buffer has been painted (Fill mode) or erased (Erase mode). It reads one of five ProgressSource values — Coverage (every channel), Value (the scalar on Scalar, or an RGB match against a reference colour + tolerance on Color/Normal), and Red/Green/Blue (Color channels only). It works against any of the three canvas types — MultiChannelCanvas, SimulationCanvas, or SingleTargetCanvas.

void OnEnable()  => tracker.OnUpdated += HandleProgress;
void OnDisable() => tracker.OnUpdated -= HandleProgress;

void HandleProgress(PaintProgressTracker t)
{
float pct = t.Progress; // 0–1 for this tracker
float all = PaintProgressTracker.GlobalProgress; // aggregate across the scene
if (PaintProgressTracker.AllReady) { /* every tracker done */ }
}
  • Counting can be restricted to the real paintable surface via an auto-generated UV-island mask, a custom mask texture, or left unmasked.
  • Readback is fully asynchronous (non-blocking AsyncGPUReadback) with a configurable downsample factor and minimum interval, so tracking many objects stays cheap.
Always unsubscribe

Subscribe to OnUpdated in OnEnable and unsubscribe in OnDisable. Failing to unsubscribe causes null-reference exceptions and leaks when objects are destroyed.


Next: Platform, Performance & FAQ