Skip to content

InteractivityZoneWrapper

public class InteractivityZoneWrapper

Component-logic accessor over an InteractivityZone, exposed as Interactivity.<ZoneName>. Component authors subscribe to the pointer events (usually in Initialize); the Circuit Designer viewport fires them on the main thread, so handlers run single-threaded alongside Update. The position is a Vector2, and the handler is a PointerHandler, so the events also appear in autocomplete.

Events are HashSet-backed so a repeated += of the SAME handler is idempotent: Initialize() is re-invoked on the same logic instance, and a naive multicast event would otherwise fire the handler N times. When the logic recompiles, the zone starts again with no subscribers, so stale handlers never fire.

public event PointerHandler MouseDown;

Pointer pressed inside the zone, in the Circuit Designer’s interactivity mode. The argument is the pointer’s position in the 3D view.

public event PointerHandler MouseUp;

Pointer released after a press that began on the zone. It also fires when the press is abandoned (interactivity mode left with the button still held), at the position of the press, so a momentary button does not stay latched.

public event PointerHandler DragStart;

First motion past the drag threshold (2 pixels) after a press on the zone.

public event PointerHandler Drag;

Motion while dragging the zone. Fires each time the pointer moves during a drag.

public event PointerHandler DragEnd;

Drag finished: the pointer was released after dragging. Fires just before MouseUp. It also fires, just before MouseUp, when a drag is abandoned by leaving interactivity mode.

Generated from the CRUMB source, commit fcec660d, 2026-10-29.