Skip to main content
Events are after-the-fact notifications. They cannot block or change anything. Use hooks for that.

Listen

Use the enum values instead of strings to get autocomplete and typo checks:

Emit your own

Event names MUST start with your resource name:
Events are local events: every resource on the same side receives them.

Spoofing protection

ug-core:* events are reserved. A handler registered with UgCore.Events.On drops a ug-core:* event unless ug-core itself triggered it. Another resource cannot fake a death, a payment or a lifecycle change to your code.
Plain AddEventHandler does not have this protection. Always use UgCore.Events.On for ug-core:* events.

Every event

See Events reference for each event with its arguments.