Add the import
fxmanifest.lua
UgLib. It is read-only, and UgLib.Internal is private.
ug_lib_version is optional. With it, your resource does not start against an older ug-lib:
What runs where
In your resource
Enums, Math, Table, String, Format, Async, Locale and Version on both sides. Cache, Streaming, Entity, Raycast, Screen, Draw, Animation, Zone, Point and Keybind on clients.No export call. Zones and key bindings belong to your resource.Through ug-lib
Notify, TextUI, Progress, SkillCheck, Dialog, Context, Menu, Radial, Clipboard and Ui, on clients.Waiting happens in your resource. Callbacks and args stay in your resource.UgLib.Dialog exists on clients only.
Waiting calls MUST run in a thread
Dialog.*, Progress.Start, SkillCheck.Start, Radial.Open, inline Context.Open, Streaming.*, Raycast.*, Animation.Play, Animation.AttachProp and Async.WaitFor wait. Call them from a thread, an event handler or a command:
client.lua
UgLib.Dialog.Confirm MUST run in a thread.
Close reasons
A call that ends without an answer returns its empty value and a reason fromUgLib.Enums.CloseReason:
Use enums
Compare and pass values throughUgLib.Enums, never as strings: