Add Level::ScriptsReloaded event

This commit is contained in:
Wojciech Figat
2022-01-31 10:25:56 +01:00
parent 8d47ea7d2f
commit f8eba66b5e
2 changed files with 6 additions and 0 deletions

View File

@@ -577,6 +577,7 @@ public:
// Reload scripting
Level::ScriptsReload();
Scripting::Reload();
Level::ScriptsReloaded();
// Restore objects
for (auto& e : ScriptsReloadObjects)

View File

@@ -227,6 +227,11 @@ public:
/// </summary>
API_EVENT() static Action ScriptsReload;
/// <summary>
/// Fired when scene reloaded scripts (new scripting is loaded). All user objects can be restored before scenes reloading.
/// </summary>
API_EVENT() static Action ScriptsReloaded;
/// <summary>
/// Fired when scene ends reloading scripts.
/// </summary>