Merge branch 'fix_network_rpc' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-fix_network_rpc

This commit is contained in:
Wojtek Figat
2023-03-14 11:50:09 +01:00
3 changed files with 43 additions and 13 deletions

View File

@@ -983,7 +983,15 @@ void ManagedBinaryModule::OnLoaded(MAssembly* assembly)
{
if (method->GetParametersCount() == 0)
{
method->Invoke(nullptr, nullptr, nullptr);
MObject* exception = nullptr;
method->Invoke(nullptr, nullptr, &exception);
if (exception)
{
MException ex(exception);
String methodName = String(method->GetName());
ex.Log(LogType::Error, methodName.Get());
LOG(Error, "Failed to call module initializer for class {0} from assembly {1}.", String(mclass->GetFullName()), assembly->ToString());
}
}
}
}