Refactor Plugins system to support plugins in C++ scripts

This commit is contained in:
Wojtek Figat
2022-07-28 21:05:03 +02:00
parent 6f35b27c29
commit bdb69d57dd
23 changed files with 522 additions and 485 deletions

View File

@@ -38,6 +38,7 @@
#include "Engine/Platform/MessageBox.h"
#include "Engine/Engine/CommandLine.h"
#include "Engine/Serialization/JsonSerializer.h"
#include "Editor/Scripting/ScriptsBuilder.h"
#endif
#if USE_LARGE_WORLDS
@@ -950,7 +951,12 @@ bool Level::loadScene(rapidjson_flax::Value& data, int32 engineBuild, Scene** ou
LOG(Error, "Cannot load scene without game modules loaded.");
#if USE_EDITOR
if (!CommandLine::Options.Headless.IsTrue())
MessageBox::Show(TEXT("Cannot load scene without game script modules. Please fix the compilation issues. See logs for more info."), TEXT("Missing game modules"), MessageBoxButtons::OK, MessageBoxIcon::Error);
{
if (ScriptsBuilder::LastCompilationFailed())
MessageBox::Show(TEXT("Scripts compilation failed. Cannot load scene without game script modules. Please fix the compilation issues. See logs for more info."), TEXT("Failed to compile scripts"), MessageBoxButtons::OK, MessageBoxIcon::Error);
else
MessageBox::Show(TEXT("Failed to load scripts. Cannot load scene without game script modules. See logs for more info."), TEXT("Missing game modules"), MessageBoxButtons::OK, MessageBoxIcon::Error);
}
#endif
return true;
}