EVENT_ADD_ON_LOADED

From ESOUI Wiki

Jump to: navigation, search

This event fires when the game has finished loading (or attempting to load) all of an add-on's files. Add-ons typically use this event to perform initialization tasks.

Contents

Arguments

eventCode
A numeric constant; the value of the global variable EVENT_ADD_ON_LOADED.
addonName
A string containing the name of the add-on that has loaded.

Example

local function Initialize()
   d("Hello, world!")
   --
   -- When this runs, all of our code has loaded, so everything we've defined 
   -- is accessible and ready for use.
end
 
local function _onAddonLoaded(eventCode, addonName)
   if addonName == "MyCoolAddon" then
      Initialize()
   end
end
 
EVENT_MANAGER:RegisterForEvent("MyExampleEvent", EVENT_ADD_ON_LOADED, _onAddonLoaded)

Notes

External links

Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox