Skip to main content
Version: latest - a1.148.0 โš–๏ธ

๐Ÿ€ Assets

Retrieve Assets Data from Asset Packs.

๐Ÿ—ฟStatic ClassClient & Server๐Ÿง‘โ€๐Ÿ’ปAPI Source

๐ŸŽ’ย Examplesโ€‹

(Assets.Precache) Precaches a Static Mesh
Assets.Precache("my-asset-pack::SM_MyStaticMesh", AssetType.StaticMesh)

๐Ÿ—ฟย Static Functionsโ€‹

ReturnsNameDescription
table of tableGetAnimationsGets a list containing all Animation Assets Keys from an AssetPack
table of tableGetAssetPacksGets a list containing information about all loaded Asset Packs
stringGetAssetPathGets the file path of an asset
table of tableGetBlueprintsGets a list containing all Blueprints Assets Keys from an AssetPack
table of tableGetMapsGets a list containing all Map Asset Keys from an AssetPack
table of tableGetMaterialsGets a list containing all Materials Asset Keys from an AssetPack
table of tableGetOthersGets a list containing all Other Assets Keys from an AssetPack
table of tableGetParticlesGets a list containing all Particle Assets Keys from an AssetPack
table of tableGetSkeletalMeshesGets a list containing all Skeletal Mesh Asset Keys from an AssetPack
table of tableGetSoundsGets a list containing all Sound Assets Keys from an AssetPack
table of tableGetStaticMeshesGets a list containing all Static Mesh Assets Keys from an AssetPack
PrecacheManually adds an Asset to be loaded during the Player's loading screen

Slow

GetAnimationsโ€‹

Gets a list containing all Animation Assets Keys from an AssetPack
local ret = Assets.GetAnimations(asset_pack_path)

Parameters

TypeParameterDefaultDescription
stringasset_pack_path Required parameter The Asset Pack path to get the assets

Returns

TypeDescription
table of tablearray of tables containing all assets and its metadata with this format

Slow

GetAssetPacksโ€‹

Gets a list containing information about all loaded Asset Packs
local ret = Assets.GetAssetPacks()

Returns

TypeDescription
table of tablewith this format

Moderate

GetAssetPathโ€‹

Gets the file path of an asset
local ret = Assets.GetAssetPath(asset, asset_type)

Parameters

TypeParameterDefaultDescription
stringasset Required parameter The asset reference in the format asset-pack::AssetKey
AssetTypeasset_type Required parameter The Asset Type

Returns

TypeDescription
stringThe file path defined in the Assets.toml

Slow

GetBlueprintsโ€‹

Gets a list containing all Blueprints Assets Keys from an AssetPack
local ret = Assets.GetBlueprints(asset_pack_path)

Parameters

TypeParameterDefaultDescription
stringasset_pack_path Required parameter The Asset Pack path to get the assets

Returns

TypeDescription
table of tablearray of tables containing all assets and its metadata with this format

Slow

GetMapsโ€‹

Gets a list containing all Map Asset Keys from an AssetPack
local ret = Assets.GetMaps(asset_pack_path)

Parameters

TypeParameterDefaultDescription
stringasset_pack_path Required parameter The Asset Pack path to get the assets

Returns

TypeDescription
table of tablearray of tables containing all assets and its metadata with this format

Slow

GetMaterialsโ€‹

Gets a list containing all Materials Asset Keys from an AssetPack
local ret = Assets.GetMaterials(asset_pack_path)

Parameters

TypeParameterDefaultDescription
stringasset_pack_path Required parameter The Asset Pack path to get the assets

Returns

TypeDescription
table of tablearray of tables containing all assets and its metadata with this format

Slow

GetOthersโ€‹

Gets a list containing all Other Assets Keys from an AssetPack
local ret = Assets.GetOthers(asset_pack_path)

Parameters

TypeParameterDefaultDescription
stringasset_pack_path Required parameter The Asset Pack path to get the assets

Returns

TypeDescription
table of tablearray of tables containing all assets and its metadata with this format

Slow

GetParticlesโ€‹

Gets a list containing all Particle Assets Keys from an AssetPack
local ret = Assets.GetParticles(asset_pack_path)

Parameters

TypeParameterDefaultDescription
stringasset_pack_path Required parameter The Asset Pack path to get the assets

Returns

TypeDescription
table of tablearray of tables containing all assets and its metadata with this format

Slow

GetSkeletalMeshesโ€‹

Gets a list containing all Skeletal Mesh Asset Keys from an AssetPack
local ret = Assets.GetSkeletalMeshes(asset_pack_path)

Parameters

TypeParameterDefaultDescription
stringasset_pack_path Required parameter The Asset Pack path to get the assets

Returns

TypeDescription
table of tablearray of tables containing all assets and its metadata with this format

Slow

GetSoundsโ€‹

Gets a list containing all Sound Assets Keys from an AssetPack
local ret = Assets.GetSounds(asset_pack_path)

Parameters

TypeParameterDefaultDescription
stringasset_pack_path Required parameter The Asset Pack path to get the assets

Returns

TypeDescription
table of tablearray of tables containing all assets and its metadata with this format

Slow

GetStaticMeshesโ€‹

Gets a list containing all Static Mesh Assets Keys from an AssetPack
local ret = Assets.GetStaticMeshes(asset_pack_path)

Parameters

TypeParameterDefaultDescription
stringasset_pack_path Required parameter The Asset Pack path to get the assets

Returns

TypeDescription
table of tablearray of tables containing all assets and its metadata with this format

Optimal

Precacheโ€‹

Manually adds an Asset to be loaded during the Player's loading screen
Assets.Precache(asset_path, asset_type)

Parameters

TypeParameterDefaultDescription
stringasset_path Required parameter The Asset Key
AssetTypeasset_type Required parameter The Asset Type
Assets.Precache Examples
Precaches a Static Mesh
Assets.Precache("my-asset-pack::SM_MyStaticMesh", AssetType.StaticMesh)