![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
The IPackage resource interface.
Get the constant IPackage interface.
Murl.Resource.IPackage GetPackageInterface()
Initialize this package.
Boolean Init()
De-initialize this package.
Boolean DeInit()
Create a binary representation from the package.
Boolean, Murl.Data CreateBinary(Murl.Data data, Integer checkConfig, Boolean makeDefault, Boolean allowReferences)
data | A reference to a Data object receiving the binary. |
checkConfig | If >0, the current IAppConfiguration object (and its contained IEngineConfiguration and IPlatformConfiguration objects) are checked for valid configuration options to include in the actual binary if it matches the corresponding bit from CheckConfig enum. If 0, all present objects are included, for all configuration specified in the package. |
makeDefault | Only considered if checkConfig is true. If makeDefault is also true, only the first object of a set of conditional resources (i.e. resource objects with the same ID) matching a valid configuration is packed into the output binary, and all other ones in this set are left out. If false, all objects with matching configuration tags are included. |
allowReferences | If true, resource objects with identical binary representations are included only once in the package and referenced multiple times. If false, all objects are packaged regardless of duplication. |
Get the package ID.
String GetId()
Get the user-defined package revision.
Integer GetRevision()
Get the package's actual type.
Murl.IEnums.PackageType GetPackageType()
Get the type of file this resource package was constructed from.
Murl.IEnums.FileType GetFileType()
Get the optional file category containing the file this package was constructed from.
Murl.IEnums.FileCategory GetFileCategory()
Get the optional file name this package was constructed from, relative to the file category returned via GetFileCategory().
String GetFileName()
Get the number of graph instances defined to be created upon package loading.
Integer GetNumberOfGraphInstancesToCreate()
Get a specific graph instance to create upon package loading.
Murl.Resource.IInstance GetGraphInstanceToCreate(Integer index)
index | The instance index, from 0 to GetNumberOfGraphInstancesToCreate()-1. |
Get the number of script instances defined to be created upon package loading.
Integer GetNumberOfScriptInstancesToCreate()
Get a specific script instance to create upon package loading.
Murl.Resource.IInstance GetScriptInstanceToCreate(Integer index)
index | The instance index, from 0 to GetNumberOfScriptInstancesToCreate()-1. |
Get the total number of generic resource objects contained in the package.
Integer GetNumberOfObjects()
Get the number of specialized IBinary resource objects contained in the package.
Integer GetNumberOfBinaries()
Get the number of specialized IGraph resource objects contained in the package.
Integer GetNumberOfGraphs()
Get the number of specialized IImage resource objects contained in the package.
Integer GetNumberOfImages()
Get the number of specialized IMesh resource objects contained in the package.
Integer GetNumberOfMeshes()
Get the number of specialized IFont resource objects contained in the package.
Integer GetNumberOfFonts()
Get the number of specialized IShader resource objects contained in the package.
Integer GetNumberOfShaders()
Get the number of specialized IAudio resource objects contained in the package.
Integer GetNumberOfAudios()
Get the number of specialized IAnimation resource objects contained in the package.
Integer GetNumberOfAnimations()
Get the number of specialized IAtlas resource objects contained in the package.
Integer GetNumberOfAtlases()
Get the number of specialized IArchive resource objects contained in the package.
Integer GetNumberOfArchives()
Get the number of specialized IVideo resource objects contained in the package.
Integer GetNumberOfVideos()
Get the number of script resources contained in the package.
Integer GetNumberOfScripts()
Get the number of dictionary resources contained in the package.
Integer GetNumberOfDictionaries()
Get the number of grid resources contained in the package.
Integer GetNumberOfGrids()
Get the number of text resources contained in the package.
Integer GetNumberOfTexts()
Get the number of sub-packages contained in the package.
Integer GetNumberOfSubPackages()
Get the specialized IBinary resource object at a given index.
Murl.Resource.IBinary GetBinary(Integer index)
index | The object index, from 0 to GetNumberOfBinaries()-1. |
Get the first specialized IBinary resource object matching the current configuration.
Murl.Resource.IBinary GetBinary(String id)
id | The resource object ID. |
Get the specialized IGraph resource object at a given index.
Murl.Resource.IGraph GetGraph(Integer index)
index | The object index, from 0 to GetNumberOfGraphs()-1. |
Get the first specialized IGraph resource object matching the current configuration.
Murl.Resource.IGraph GetGraph(String id)
id | The resource object ID. |
Get the specialized IImage resource object at a given index.
Murl.Resource.IImage GetImage(Integer index)
index | The object index, from 0 to GetNumberOfImages()-1. |
Get the first specialized IImage resource object matching the current configuration.
Murl.Resource.IImage GetImage(String id)
id | The resource object ID. |
Get the specialized IMesh resource object at a given index.
Murl.Resource.IMesh GetMesh(Integer index)
index | The object index, from 0 to GetNumberOfMeshes()-1. |
Get the first specialized IMesh resource object matching the current configuration.
Murl.Resource.IMesh GetMesh(String id)
id | The resource object ID. |
Get the specialized IFont resource object at a given index.
Murl.Resource.IFont GetFont(Integer index)
index | The object index, from 0 to GetNumberOfFonts()-1. |
Get the first specialized IFont resource object matching the current configuration.
Murl.Resource.IFont GetFont(String id)
id | The resource object ID. |
Get the specialized IShader resource object at a given index.
Murl.Resource.IShader GetShader(Integer index)
index | The object index, from 0 to GetNumberOfShaders()-1. |
Get the first specialized IShader resource object matching the current configuration.
Murl.Resource.IShader GetShader(String id)
id | The resource object ID. |
Get the specialized IAudio resource object at a given index.
Murl.Resource.IAudio GetAudio(Integer index)
index | The object index, from 0 to GetNumberOfAudios()-1. |
Get the first specialized IAudio resource object matching the current configuration.
Murl.Resource.IAudio GetAudio(String id)
id | The resource object ID. |
Get the specialized IAnimation resource object at a given index.
Murl.Resource.IAnimation GetAnimation(Integer index)
index | The object index, from 0 to GetNumberOfAnimations()-1. |
Get the first specialized IAnimation resource object matching the current configuration.
Murl.Resource.IAnimation GetAnimation(String id)
id | The resource object ID. |
Get the specialized IAtlas resource object at a given index.
Murl.Resource.IAtlas GetAtlas(Integer index)
index | The object index, from 0 to GetNumberOfAtlases()-1. |
Get the first specialized IAtlas resource object matching the current configuration.
Murl.Resource.IAtlas GetAtlas(String id)
id | The resource object ID. |
Get the specialized IArchive resource object at a given index.
Murl.Resource.IArchive GetArchive(Integer index)
index | The object index, from 0 to GetNumberOfArchives()-1. |
Get the first specialized IArchive resource object matching the current configuration.
Murl.Resource.IArchive GetArchive(String id)
id | The resource object ID. |
Get the specialized IVideo resource object at a given index.
Murl.Resource.IVideo GetVideo(Integer index)
index | The object index, from 0 to GetNumberOfVideos()-1. |
Get the first specialized IVideo resource object matching the current configuration.
Murl.Resource.IVideo GetVideo(String id)
id | The resource object ID. |
Get the script resource at a given index.
Murl.Resource.IScript GetScript(Integer index)
index | The script index, from 0 to GetNumberOfScripts()-1. |
Get the first script resource matching the current configuration.
Murl.Resource.IScript GetScript(String id)
id | The resource object ID. |
Get the dictionary resource at a given index.
Murl.Resource.IDictionary GetDictionary(Integer index)
index | The dictionary index, from 0 to GetNumberOfDictionaries()-1. |
Get the first dictionary resource matching the current configuration.
Murl.Resource.IDictionary GetDictionary(String id)
id | The resource object ID. |
Get the grid resource at a given index.
Murl.Resource.IGrid GetGrid(Integer index)
index | The grid index, from 0 to GetNumberOfGrids()-1. |
Get the first grid resource matching the current configuration.
Murl.Resource.IGrid GetGrid(String id)
id | The resource object ID. |
Get the text resource at a given index.
Murl.Resource.IText GetText(Integer index)
index | The text index, from 0 to GetNumberOfTexts()-1. |
Get the first text resource matching the current configuration.
Murl.Resource.IText GetText(String id)
id | The text ID. |
Get the sub-package at a given index.
Murl.Resource.IPackage GetSubPackage(Integer index)
index | The sub-package index, from 0 to GetNumberOfSubPackages()-1. |
Get the first sub-package matching the current configuration.
Murl.Resource.IPackage GetSubPackage(String id)
id | The sub-package ID. |
Set the optional parent package this package belongs to.
Boolean SetParentPackage(Murl.Resource.IPackage parentPackage)
parentPackage | The containing package, or null for removing. |
Get the optional parent package this package belongs to.
Murl.Resource.IPackage GetParentPackage()
Set optional meta data for this package. If set, the package takes ownership of the meta data. The meta data object is automatically deleted when the package is destroyed, or a different meta data object is set.
Boolean SetMetaData(Murl.Resource.IMetaData metaData)
metaData | The meta data, or null for removing. |
Get the optional meta data held by this package.
Murl.Resource.IMetaData GetMetaData()
Set optional resource tags for this package.
Boolean SetTags(Murl.Array.String tags)
tags | The resource tags. |
Get the optional resource tags held by this package.
Murl.Array.String GetTags()
Query the total number of allocated resource bytes in this package.
Integer GetNumberOfAllocatedResourceBytes()