class EngineScriptLibrary

Inherits: ScriptLibrary

Handles initialization/shutdown of the script systems and loading/refresh of engine-specific assemblies.

Public

Constructors

EngineScriptLibrary

EngineScriptLibrary() = default

Methods

Initialize

void Initialize() override

Called when the script system is being activated.

Update

void Update() override

Called once per frame.

Reload

void Reload() override

Called when the script libraries should be reloaded (for example when they are recompiled).

Destroy

void Destroy() override

Called when the script system is being destroyed.

GetEngineAssemblyPath

Path GetEngineAssemblyPath() const override

Returns the absolute path to the builtin managed engine assembly file.

GetEngineAssemblyName

const char *GetEngineAssemblyName() const override

Returns the name of the assembly that wraps built-in engine functionality, without extension.

GetGameAssemblyPath

Path GetGameAssemblyPath() const override

Returns the absolute path to the game managed assembly file.

GetGameAssemblyName

const char *GetGameAssemblyName() const override

Returns the name of the assembly that will store user's runtime application code, without extension.

GetBuiltinAssemblyFolder

Path GetBuiltinAssemblyFolder() const override

Returns the absolute path to the folder where built-in assemblies are located in.

GetScriptAssemblyFolder

Path GetScriptAssemblyFolder() const override

Returns the absolute path to the folder where script assemblies are located in.

GetBuiltinAssembliesPath

Path GetBuiltinAssembliesPath() const override

Returns the absolute path at which builtin assemblies requires by the scripting runtime are located.

GetScriptingRuntimePath

Path GetScriptingRuntimePath() const override

Returns the absolute path at which miscellaneous files required by the scripting runtime are located.

staticGetReleaseAssemblyPath

static const Path &GetReleaseAssemblyPath()

Returns the absolute path where the managed release assemblies are located.

staticGetDebugAssemblyPath

static const Path &GetDebugAssemblyPath()

Returns the absolute path where the managed debug assemblies are located.

staticInstance

static EngineScriptLibrary &Instance()

Returns the singleton instance of this library.

Protected

Methods

LoadMonoTypes

void LoadMonoTypes()

Loads all managed types and methods used by this module.

UnloadAssemblies

void UnloadAssemblies()

Unloads all manages assemblies and the mono domain.

ShutdownModules

void ShutdownModules()

Shuts down all script engine modules.

TriggerOnInitialize

void TriggerOnInitialize()

Triggers the Application::OnInitialize() managed method.

TriggerOnDestroy

void TriggerOnDestroy()

Triggers the Application::OnDestroy() managed method.

OnAssemblyRefreshComplete

void OnAssemblyRefreshComplete()

Triggered when an assembly refreshed finished.

Private

Fields

mScriptAssembliesLoaded

bool mScriptAssembliesLoaded

mUpdateMethod

MonoMethod * mUpdateMethod

mEngineAssembly

MonoAssembly * mEngineAssembly

mOnAssemblyRefreshAssembliesLoadedConnection

HEvent mOnAssemblyRefreshAssembliesLoadedConnection

mOnAssemblyRefreshDoneConnection

HEvent mOnAssemblyRefreshDoneConnection