Add support for compiling and running engine without C# scripting

(configurable via `EngineConfiguration.UseCSharp` in Flax.Build)
This commit is contained in:
Wojtek Figat
2021-10-23 16:41:57 +02:00
parent 0b3d6b03ac
commit 8938f13a0b
86 changed files with 1244 additions and 688 deletions

View File

@@ -5,7 +5,7 @@
#include "Engine/Scripting/ScriptingCalls.h"
#include "MException.h"
MainThreadManagedInvokeAction* MainThreadManagedInvokeAction::Invoke(MMethod* method, MonoObject* instance, LogType exceptionLevel)
MainThreadManagedInvokeAction* MainThreadManagedInvokeAction::Invoke(MMethod* method, MObject* instance, LogType exceptionLevel)
{
ASSERT_LOW_LAYER(method != nullptr);
@@ -23,7 +23,7 @@ MainThreadManagedInvokeAction* MainThreadManagedInvokeAction::Invoke(MMethod* me
}
}
MainThreadManagedInvokeAction* MainThreadManagedInvokeAction::Invoke(MMethod* method, ParamsBuilder& params, MonoObject* instance, LogType exceptionLevel)
MainThreadManagedInvokeAction* MainThreadManagedInvokeAction::Invoke(MMethod* method, ParamsBuilder& params, MObject* instance, LogType exceptionLevel)
{
ASSERT_LOW_LAYER(method != nullptr);
@@ -59,14 +59,14 @@ MainThreadManagedInvokeAction* MainThreadManagedInvokeAction::Invoke(void* metho
}
}
void MainThreadManagedInvokeAction::InvokeNow(MMethod* method, ParamsBuilder& params, MonoObject* instance, LogType exceptionLevel)
void MainThreadManagedInvokeAction::InvokeNow(MMethod* method, ParamsBuilder& params, MObject* instance, LogType exceptionLevel)
{
ASSERT_LOW_LAYER(method != nullptr);
void* paramsData[8];
params.GetParams(paramsData);
MonoObject* exception = nullptr;
MObject* exception = nullptr;
method->Invoke(instance, paramsData, &exception);
if (exception)
{
@@ -82,14 +82,13 @@ bool MainThreadManagedInvokeAction::Run()
void* paramsData[8];
_params.GetParams(paramsData);
MonoObject* exception = nullptr;
MObject* exception = nullptr;
if (_method)
{
_method->Invoke(_instance, paramsData, &exception);
}
else
else if (_methodThunk)
{
ASSERT(_methodThunk);
switch (_params.Count)
{
case 0: