Back to API Reference
Class

AttributeChannel

abstract

Single owner of the pipeline work behind one attribute key: subscribes the passes that read the keyed buffer and holds the per-range state those passes consume.

Remarks

One channel exists per key per component however many modifiers write that key, so a pass runs once over the merged buffer instead of once per writer. Writers only fill the buffer from OnApply; anything a pass reads belongs here, never on a writer. OnActivate runs when the first writer enables and OnDeactivate when the last one disables, so subscriptions match the writers' active span exactly. OnRelease runs when the key's last writer is destroyed. Passes may run on the rebuild worker — no Unity API calls.
protected string Key{ get; set }

The attribute key this channel owns.

protected BaseModifier Provider{ get }

An active writer, for dispatching hooks a pass needs from the writer's type. Any of them serves: a pass reads the merged buffer and this channel's state, never a writer's fields.

protected abstract void OnActivate()

Subscribes the channel's passes.

protected abstract void OnDeactivate()

Unsubscribes the channel's passes.

protected virtual void OnRelease()

Releases pooled state acquired by OnActivate.

protected virtual void OnProviderChanged()

Rebinds whatever OnActivate captured from Provider, after that writer left with others still active. A channel that captures nothing needs no override.

protected virtual void OnBeginCycle()

Brings state the writers append to back to a valid start, once per apply cycle before the first OnApply of that cycle. Every writer of the key re-applies within one cycle, so entries collected here are always complete.

protected UniTextBase uniText

The component this channel serves, from its first writer until release.

protected UniTextBuffers buffers

Text-processing buffers of uniText.