This commit is contained in:
2022-12-20 22:39:16 +02:00
parent 15af6502a0
commit 55747edaae
6 changed files with 206 additions and 167 deletions

View File

@@ -136,21 +136,21 @@ bool MCore::LoadEngine()
// Prepare managed side
const String hostExecutable = Platform::GetExecutableFilePath();
CoreCLR::CallStaticMethodInternal<void, const Char*>(TEXT("Init"), hostExecutable.Get());
CoreCLR::CallStaticMethodByName<void, const Char*>(TEXT("Init"), hostExecutable.Get());
MRootDomain = New<MDomain>("Root");
MDomains.Add(MRootDomain);
char* buildInfo = mono_get_runtime_build_info();
char* buildInfo = CoreCLR::CallStaticMethodByName<char*>(TEXT("GetRuntimeInformation"));
LOG(Info, ".NET runtime version: {0}", String(buildInfo));
mono_free(buildInfo);
CoreCLR::Free(buildInfo);
return false;
}
void MCore::UnloadEngine()
{
CoreCLR::CallStaticMethodInternal<void>(TEXT("Exit"));
CoreCLR::CallStaticMethodByName<void>(TEXT("Exit"));
MDomains.ClearDelete();
MRootDomain = nullptr;
}