Drawing.getasset

Loads a bundled Drawing icon.

Syntax

Signature
Drawing.getasset(Name: string) -> string

Aliases

This function has no aliases.

Parameters

ParameterTypeDescription
NamestringOne of the bundled icon names.

Returns

TypeDescription
stringEncoded PNG bytes.

Notes

Names are settings, reference, edittheme, editkeybinds, editaliases, editwaypoints, and bindsandplugins. The name is not a file path. Missing files and names outside this list raise errors.

Example

Luau
local Image = Drawing.new("Image")
Image.Data = Drawing.getasset("settings")
Image.Position = Vector2.new(20, 20)
Image.Size = Vector2.new(24, 24)
Image.Visible = true