diff --git a/src/ui/ScriptFunctionsSystem.cpp b/src/ui/ScriptFunctionsSystem.cpp index a1f04e4..72c13dd 100644 --- a/src/ui/ScriptFunctionsSystem.cpp +++ b/src/ui/ScriptFunctionsSystem.cpp @@ -42,3 +42,9 @@ void SystemRegisterFunctions() { FrameScript_RegisterFunction(func.name, func.method); } } + +void SystemUnregisterFunctions() { + for (auto& func : s_SystemFunctions) { + FrameScript_UnregisterFunction(func.name); + } +} diff --git a/src/ui/ScriptFunctionsSystem.hpp b/src/ui/ScriptFunctionsSystem.hpp index 15fd17d..67581e6 100644 --- a/src/ui/ScriptFunctionsSystem.hpp +++ b/src/ui/ScriptFunctionsSystem.hpp @@ -3,4 +3,6 @@ void SystemRegisterFunctions(); +void SystemUnregisterFunctions(); + #endif