CoreCRL fixes and tweaks

This commit is contained in:
Wojtek Figat
2023-01-27 14:24:53 +01:00
parent 2fd251e7b1
commit 4f71976958
4 changed files with 33 additions and 44 deletions

View File

@@ -126,13 +126,9 @@ bool MCore::LoadEngine()
if (!FileSystem::FileExists(csharpRuntimeConfigPath))
LOG(Fatal, "Failed to initialize managed runtime, FlaxEngine.CSharp.runtimeconfig.json is missing.");
// Locate hostfxr and load it
if (!CoreCLR::LoadHostfxr(csharpLibraryPath))
return false;
// Initialize hosting component
if (!CoreCLR::InitHostfxr(csharpRuntimeConfigPath, csharpLibraryPath))
return false;
// Initialize hostfxr
if (CoreCLR::InitHostfxr(csharpRuntimeConfigPath, csharpLibraryPath))
return true;
// Prepare managed side
CoreCLR::CallStaticMethodByName<void>(TEXT("Init"));