Drawing.newcontext

Creates a separate retained UI context.

Syntax

Signature
Drawing.newcontext() -> DrawingUiLibrary

Aliases

This function has no aliases.

Parameters

This function takes no parameters.

Returns

TypeDescription
DrawingUiLibraryNew UI library table.

Notes

Call create, step, and destroyui on the returned table to manage that context.

Example

Luau
local Ui = Drawing.newcontext()
local Frame = Ui.create("Frame", {Size = Vector2.new(240, 160)})
Ui.destroyui()