Skip to content

API: Library

ov - Anisa edited this page Sep 30, 2025 · 26 revisions

» Overview

Assetify's core functions that enable seamless asset tracking, categorization, and retrieval, empowering users to tailor their integration to meet specific operational needs.

» Importing

It's already imported by default whenever you import assetify. You need to declare the below globally only once:

loadstring(exports.assetify_library:import())()

» APIs

  • assetify.isBooted - shared

    Verifies whether the library is booted.

    local bool: state = assetify.isBooted()
  • assetify.isLoaded - shared

    Verifies whether the library's assets are downloaded and loaded.

    local bool: state = assetify.isLoaded()
  • assetify.isModuleLoaded - shared

    Verifies whether the library's modules are downloaded and loaded.

    local bool: state = assetify.isModuleLoaded()
  • assetify.fetchSerial- shared

    Retrieves Assetify's serial.

    local ~: serial = assetify.fetchSerial()
  • assetify.fetchVersion - shared

    Retrieves Assetify's version.

    local ~: version = assetify.fetchVersion()
  • assetify.fetchWebserver - shared

    Retrieves Assetify's webserver URL.

    local ~: webserver = assetify.fetchWebserver()
  • assetify.fetchAssets - shared

    Fetches list containing valid assets within specified pack.

    local table: packAssets = assetify.fetchAssets(
       string: assetType
    )
  • assetify.getAssetData - shared

    Fetches valid asset's datas.

    local table: cAsset, table: cData = assetify.getAssetData(
       string: assetType,
       string: assetName
    )
  • assetify.getAssetDep - shared

    Fetches loaded asset's dependency.

    local ~: cDep = assetify.getAssetDep(
       string: assetType,
       string: assetName,
       string: depType,
       ~: depIndex,
       ~: depSubIndex --Optional
    )
  • assetify.setElementAsset - shared

    Updates element's asset.

    local bool: result = assetify.setElementAsset(
       element: element,
       string: assetType,
       string: assetName,
       string: assetClump, --Optional
       table: clumpMaps --Optional
    )
  • assetify.getElementAsset - shared

    Retrieves element's asset.

    local string: assetType, string: assetName, string: assetClump, table: clumpMaps = assetify.getElementAsset(
       element: element
    )
  • assetify.createDummy - shared

    Creates a dummy utilizing specified asset.

    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
    )
  • assetify.isAssetLoaded - client

    Fetches valid asset's load state.

    local bool: state = assetify.isAssetLoaded(
       string: assetType,
       string: assetName
    )
  • assetify.getAssetID - client

    Fetches loaded asset's model ID.

    local int: modelID = assetify.getAssetID(
       string: assetType,
       string: assetName,
       string: assetClump
    )
  • assetify.loadAsset - client

    Loads a valid unloaded asset.

    local bool: result = assetify.loadAsset(
       string: assetType,
       string: assetName
    )
  • assetify.unloadAsset - client

    Unloads a valid loaded asset.

    local bool: result = assetify.unloadAsset(
       string: assetType,
       string: assetName
    )
  • assetify.loadModule - shared

    Loads modules of a valid asset.

    local bool: result = assetify.loadModule(
       string: assetName,
       table: moduleTypes
    )
  • assetify.createShader - client

    Creates a valid Assetify shader.

    local shader: cShader = assetify.createShader(
       element: element, --Optional
       string: category,
       string: name,
       string: textureName, --Optional: Used only when isStandalone is not enabled
       table: textures,
       table: inputs,
       table: rwCache,
       table: maps, --Optional
       int: priority, --Optional
       float: distance, --Optional
       bool: standalone, --Optional: Enabling this prevents shader from being applied on world elements
       bool: overlay --Optional: Enabling this applies shader in overlay mode
    )

Clone this wiki locally