DrawingImmediate.GetPaint
Returns the paint signal for a drawing layer.
Repeated requests for the same layer return its signal. Immediate drawing calls must occur inside a paint callback. Commands belong to the current frame; redraw them each paint. The queue holds up to 1,024 primitives per frame.
DrawingImmediate.GetPaint(zIndex: number): SignalParameters
| Parameter | Type | Description |
|---|---|---|
zIndex | number | Integer layer index; layers are painted in ascending order. |
See Signal for the object’s members.
Example
local paint = DrawingImmediate.GetPaint(1)
local connection = paint:Connect(function()
DrawingImmediate.Line(Vector2.new(20, 20), Vector2.new(100, 20), Color3.new(1, 1, 1), 1, 1)
end)
-- Disconnect connection when the overlay is no longer needed.