DrawingImmediate. GetPaint Synchronous
Get the render-step signal used to submit immediate drawing commands each frame. Connect a callback when a drawing should be recomputed every frame. Disconnect that callback to stop submitting its primitives; zIndex does not select a separate layer in Kawaii.
Luau
DrawingImmediate.GetPaint(zIndex: number?) -> RBXScriptSignalParameters
| Parameter | Type | Description |
|---|---|---|
zIndex | number? | Optional numeric argument. It is validated but currently has no effect. |
Returns
RBXScriptSignalThe host RenderStepped signal.
Usage notes
Immediate primitives are transient. Submit them again on subsequent paint events for a continuously visible drawing.
Differences from Volt
Volt documents a paint signal for each Z index. Kawaii returns the host RenderStepped signal and currently ignores zIndex after validating it. Passing different indices does not create separate paint layers.
Example
Luau
local color = Color3.fromRGB(240, 150, 190)
local paint = DrawingImmediate.GetPaint()
local connection = paint:Connect(function()
DrawingImmediate.Line(Vector2.new(40, 40), Vector2.new(220, 40), color, 1, 2)
end)
task.wait(3)
connection:Disconnect() -- stop drawing this example