๐ Assets
Retrieve Assets Data from Asset Packs.
.
. It's not possible to spawn new instances.๐ย Examplesโ
Assets.Precache("my-asset-pack::SM_MyStaticMesh", AssetType.StaticMesh)
๐ฟย Static Functionsโ
Returns | Name | Description | |
---|---|---|---|
table of table | GetAnimations | Gets a list containing all Animation Assets Keys from an AssetPack | |
table of table | GetAssetPacks | Gets a list containing information about all loaded Asset Packs | |
string | GetAssetPath | Gets the file path of an asset | |
table of table | GetBlueprints | Gets a list containing all Blueprints Assets Keys from an AssetPack | |
table of table | GetMaps | Gets a list containing all Map Asset Keys from an AssetPack | |
table of table | GetMaterials | Gets a list containing all Materials Asset Keys from an AssetPack | |
table of table | GetOthers | Gets a list containing all Other Assets Keys from an AssetPack | |
table of table | GetParticles | Gets a list containing all Particle Assets Keys from an AssetPack | |
table of table | GetSkeletalMeshes | Gets a list containing all Skeletal Mesh Asset Keys from an AssetPack | |
table of table | GetSounds | Gets a list containing all Sound Assets Keys from an AssetPack | |
table of table | GetStaticMeshes | Gets a list containing all Static Mesh Assets Keys from an AssetPack | |
Precache | Manually adds an Asset to be loaded during the Player's loading screen |
GetAnimations
Gets a list containing all Animation Assets Keys from an AssetPack
โ Returns table of table (array of tables containing all assets and it's metadata with this format).
local ret = Assets.GetAnimations(asset_pack_path)
Type | Parameter | Default | Description |
---|---|---|---|
string | asset_pack_path | Required parameter | The Asset Pack path to get the assets |
GetAssetPacks
Gets a list containing information about all loaded Asset Packs
โ Returns table of table (with this format).
local ret = Assets.GetAssetPacks()
GetAssetPath
Gets the file path of an asset
โ Returns string (The file path defined in the Assets.toml).
local ret = Assets.GetAssetPath(asset, asset_type)
Type | Parameter | Default | Description |
---|---|---|---|
string | asset | Required parameter | The asset reference in the format asset-pack::AssetKey |
AssetType | asset_type | Required parameter | The Asset Type |
GetBlueprints
Gets a list containing all Blueprints Assets Keys from an AssetPack
โ Returns table of table (array of tables containing all assets and it's metadata with this format).
local ret = Assets.GetBlueprints(asset_pack_path)
Type | Parameter | Default | Description |
---|---|---|---|
string | asset_pack_path | Required parameter | The Asset Pack path to get the assets |
GetMaps
Gets a list containing all Map Asset Keys from an AssetPack
โ Returns table of table (array of tables containing all assets and it's metadata with this format).
local ret = Assets.GetMaps(asset_pack_path)
Type | Parameter | Default | Description |
---|---|---|---|
string | asset_pack_path | Required parameter | The Asset Pack path to get the assets |
GetMaterials
Gets a list containing all Materials Asset Keys from an AssetPack
โ Returns table of table (array of tables containing all assets and it's metadata with this format).
local ret = Assets.GetMaterials(asset_pack_path)
Type | Parameter | Default | Description |
---|---|---|---|
string | asset_pack_path | Required parameter | The Asset Pack path to get the assets |
GetOthers
Gets a list containing all Other Assets Keys from an AssetPack
โ Returns table of table (array of tables containing all assets and it's metadata with this format).
local ret = Assets.GetOthers(asset_pack_path)
Type | Parameter | Default | Description |
---|---|---|---|
string | asset_pack_path | Required parameter | The Asset Pack path to get the assets |
GetParticles
Gets a list containing all Particle Assets Keys from an AssetPack
โ Returns table of table (array of tables containing all assets and it's metadata with this format).
local ret = Assets.GetParticles(asset_pack_path)
Type | Parameter | Default | Description |
---|---|---|---|
string | asset_pack_path | Required parameter | The Asset Pack path to get the assets |
GetSkeletalMeshes
Gets a list containing all Skeletal Mesh Asset Keys from an AssetPack
โ Returns table of table (array of tables containing all assets and it's metadata with this format).
local ret = Assets.GetSkeletalMeshes(asset_pack_path)
Type | Parameter | Default | Description |
---|---|---|---|
string | asset_pack_path | Required parameter | The Asset Pack path to get the assets |
GetSounds
Gets a list containing all Sound Assets Keys from an AssetPack
โ Returns table of table (array of tables containing all assets and it's metadata with this format).
local ret = Assets.GetSounds(asset_pack_path)
Type | Parameter | Default | Description |
---|---|---|---|
string | asset_pack_path | Required parameter | The Asset Pack path to get the assets |
GetStaticMeshes
Gets a list containing all Static Mesh Assets Keys from an AssetPack
โ Returns table of table (array of tables containing all assets and it's metadata with this format).
local ret = Assets.GetStaticMeshes(asset_pack_path)
Type | Parameter | Default | Description |
---|---|---|---|
string | asset_pack_path | Required parameter | The Asset Pack path to get the assets |
Precache
Manually adds an Asset to be loaded during the Player's loading screen
Assets.Precache(asset_path, asset_type)
Type | Parameter | Default | Description |
---|---|---|---|
string | asset_path | Required parameter | The Asset Key |
AssetType | asset_type | Required parameter | The Asset Type |
Assets.Precache Examples
Assets.Precache("my-asset-pack::SM_MyStaticMesh", AssetType.StaticMesh)