Repository navigation
API: Library
ᴏᴠ ━ ᴀɴɪꜱᴀ edited this page Mar 4, 2025
·
26 revisions
todo.
It's already imported by default whenever you import assetify. You need to declare the below globally only once:
loadstring(exports.assetify_library:import())() ✨*Verifies whether the library is booted.*
```lua
local bool: state = assetify.isBooted ()
```
✨*Verifies whether the library's assets are downloaded and loaded.*
```lua
local bool: state = assetify.isLoaded()
```
✨*Verifies whether the library's modules are downloaded and loaded.*
```lua
local bool: state = assetify.isModuleLoaded()
```
✨*Retrieves Assetify's serial.*
```lua
local ~: serial = assetify.fetchSerial()
```
✨*Retrieves Assetify's version.*
```lua
local ~: version = assetify.fetchVersion()
```
✨*Retrieves Assetify's webserver URL.*
```lua
local ~: webserver = assetify.fetchWebserver()
```
✨*Fetches list containing valid assets within specified pack.*
```lua
local table: packAssets = assetify.fetchAssets(
string: assetType
)
```
✨*Fetches valid asset's datas.*
```lua
local table: cAsset, table: cData = assetify.getAssetData(
string: assetType,
string: assetName
)
```
✨*Fetches loaded asset's dependency.*
```lua
local ~: cDep = assetify.getAssetDep(
string: assetType,
string: assetName,
string: depType,
~: depIndex,
~: depSubIndex --Optional
)
```
✨*Updates element's asset.*
```lua
local bool: result = assetify.setElementAsset(
element: element,
string: assetType,
string: assetName,
string: assetClump, --Optional
table: clumpMaps --Optional
)
```
✨*Retrieves element's asset.*
```lua
local string: assetType, string: assetName, string: assetClump, table: clumpMaps = assetify.getElementAsset(
element: element
)
```
✨*Creates a dummy utilizing specified asset.*
```lua
local dummy: cDummy = assetify.createDummy(
string: assetType,
string: assetName,
string: assetClump,
table: clumpMaps,
table: {
position = {x = 0, y = 0, z = 0}, --Optional
rotation = {x = 0, y = 0, z = 0}, --Optional
dimension = 0, --Optional
interior = 0 --Optional
},
bool: isScoped
)
```
✨*Retrieves library/asset's download progress.*
```lua
--Syntax 1: Retrieves overall library's overall progress
local float: cDownloaded, float: cBandwidth, float: cProgress, float: cETA = assetify.getDownloadProgress()
--Syntax 2: Retrieves specifically an asset's progress
local float: cDownloaded, float: cBandwidth, float: cProgress, float: cETA = assetify.getDownloadProgress(
string: assetType,
string: assetName
)
```
✨*Fetches valid asset's load state.*
```lua
local bool: state = assetify.isAssetLoaded(
string: assetType,
string: assetName
)
```
✨*Fetches loaded asset's model ID.*
```lua
local int: modelID = assetify.getAssetID(
string: assetType,
string: assetName,
string: assetClump
)
```
✨*Loads a valid unloaded asset.*
```lua
local bool: result = assetify.loadAsset(
string: assetType,
string: assetName
)
```
✨*Unloads a valid loaded asset.*
```lua
local bool: result = assetify.unloadAsset(
string: assetType,
string: assetName
)
```
✨*Loads modules of a valid asset.*
```lua
local bool: result = assetify.loadModule(
string: assetName,
table: moduleTypes
)
```
✨*Creates a valid Assetify shader.*
```lua
local shader: cShader = assetify.createShader(
element: element, --Optional
string: shaderCategory,
string: shaderName,
string: textureName, --Optional: Used only when isStandalone is not enabled
table: shaderTextures,
table: shaderInputs,
table: rwCache,
table: shaderMaps, --Optional
int: shaderPriority, --Optional
float: shaderDistance, --Optional
bool: isStandalone --Optional: Enabling this prevents shader from being applied on world elements
)
```