Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
NativeScripting::System Namespace Reference

Functions

void UpdateScripts (Engine::Core &core)
void DestroyScript (Engine::Core::Registry &registry, Engine::EntityId entity)
 Call OnDestroy function for entity and destroy the script instance.
void SetOnDestroy (Engine::Core &core)
 Sets the callback function to be called when the scripting system is destroyed.

Function Documentation

◆ DestroyScript()

void NativeScripting::System::DestroyScript ( Engine::Core::Registry & registry,
Engine::EntityId entity )

Call OnDestroy function for entity and destroy the script instance.

IMPORTANT: This function should only be used by SetOnDestroy system.

Parameters
entityThe entity whose script is to be destroyed.
registryThe registry that manages the entity and its components.

◆ SetOnDestroy()

void NativeScripting::System::SetOnDestroy ( Engine::Core & core)

Sets the callback function to be called when the scripting system is destroyed.

This function registers a callback that will be executed when the ScriptingSystem is being destroyed. It allows for custom cleanup or resource deallocation.

Parameters
coreReference to the core engine instance.

◆ UpdateScripts()

void NativeScripting::System::UpdateScripts ( Engine::Core & core)