uLua v2.2.0
A Lua Modding Framework for Unity.
uLua.ScriptPackage Class Reference

A class to describe Lua packages. More...

Public Member Functions

 ScriptPackage (string Name, string FolderName, ScriptPackageJson PackageJson, bool IsExternal)
 Public constructor. This is the main way to initialise a ScriptPackage object. More...
 
void SwitchToExternal ()
 This method is used to switch the package definition to external. Using this method instead of a public property protects the accessibility of IsExternal.
 

Properties

bool AllowExternalOverride [get]
 Determines whether a ScriptPackage defined in resources can be overriden by an external definition.
 
bool LoadAllFiles [get]
 Determines which scripts of a ScriptPackage will be executed. If true, all scripts found under the ScriptPackage folder will be executed. Otherwise, only scripts specified in the Contents list will be executed.
 
bool LoadOnDemand [get]
 Determines whether the ScriptPackage will be loaded on demand or on load. If true, the ScriptPackage will not be loaded until explicitly requested. Otherwise, it will be loaded during on scene initialisation.
 
string[] Contents [get]
 Gets the array of script names specified as contents of the ScriptPackage.
 
string[] Dependencies [get]
 Gets the array of dependencies specified for the ScriptPackage.
 
string Description [get]
 Gets the description of the ScriptPackage.
 
string FolderName [get]
 Gets the name of the folder in which the ScriptPackage is contained (i.e. if it differs from the index name of the Lua package).
 
bool IsExternal [get]
 Gets the IsExternal property of the package.
 
string Name [get]
 Gets the index name of the ScriptPackage.
 
string Title [get]
 Gets the title of the ScriptPackage for display purposes.
 
string Version [get]
 Gets the version string of the ScriptPackage.
 

Detailed Description

A class to describe Lua packages.

Constructor & Destructor Documentation

◆ ScriptPackage()

uLua.ScriptPackage.ScriptPackage ( string  Name,
string  FolderName,
ScriptPackageJson  PackageJson,
bool  IsExternal 
)
inline

Public constructor. This is the main way to initialise a ScriptPackage object.

Parameters
NameThe name of the ScriptPackage.
FolderNameThe name of the folder in which the ScriptPackage is contained (i.e. if it differs from the name of the Lua package).
PackageJsonThe object which holds most information for the Lua package.
IsExternalSpecifies if the script package was defined as an external package.