Skip to content
Immediate drawingOverview

DrawingImmediate.GetPaint

Provides a paint object for the drawing lifecycle.

Details#

Creates a paint handle with an optional numeric z-index, default 0. Connect a callback to draw each frame. The handle owns callback registrations; Clear removes them.

Examples#

Example

Luau
local paint = DrawingImmediate.GetPaint(0)
local id = paint:Connect(function()
    DrawingImmediate.Text(Vector2.new(20, 20), "EXOL", Color3.new(1, 1, 1))
end)
task.delay(1, function() paint:Disconnect(id) end)