Skip to content

Glossary: Events

Tron edited this page Jun 14, 2022 · 25 revisions

━ Assetify:onLoad (Shared)

@Objective: Fired after library gets loaded and assets are downloaded.
⚠️ This network is destroyed instantly right after its fired, for latter usage refer
network:fetch("Assetify:onLoad", true):on(function()
    print("Assetify successfully loaded")
end)

━ Assetify:onUnload (Shared)

@Objective: Fired after library & assets get unloaded.
network:fetch("Assetify:onUnload", true):on(function()
    print("Assetify successfully unloaded")
end)

━ Assetify:onModuleLoad (Shared)

@Objective: Fired after library's modules are downloaded and loaded.
⚠️ This network is destroyed instantly right after its fired, for latter usage refer
network:fetch("Assetify:onModuleLoad", true):on(function()
    print("Assetify's modules successfully loaded")
end)

━ Assetify:onLoad (Client)

@Objective: Fired when asset is being loaded.
network:fetch("Assetify:onLoad", true):on(function(assetType, assetName)
    print("Asset Loaded: "..assetName.."("..assetType..")")
end)

━ Assetify:onUnload (Client)

@Objective: Fired when asset is being unloaded.
network:fetch("Assetify:onUnload", true):on(function(assetType, assetName)
    print("Asset Unloaded: "..assetName.."("..assetType..")")
end)

---

###Assetify:onGlobalDataChange (Shared)
##### @Objective: Fired when asset is being unloaded.
```lua
network:fetch("Assetify:onGlobalDataChange", true):on(function(data, oldValue, newValue)
    print("Global Data Changed: "..data.." : "..tostring(oldValue).." : "..tostring(newValue))
end)
Clone this wiki locally