Refactor CoreCLR runtime into explicit dotnet api instead of mocking mono api

Required by platforms that will use mono under the hood for .Net 7
New `USE_CSHARP` define for C# ability
Engine doesn't use `mono_*` apis directly but via MCore/MClass/MMethod/ apis
This commit is contained in:
Wojtek Figat
2023-03-27 17:29:42 +02:00
parent eed2cdfe04
commit 510fc443e8
111 changed files with 17048 additions and 8765 deletions

View File

@@ -12,10 +12,7 @@
#include "Engine/Profiler/ProfilerCPU.h"
#include "Engine/Threading/MainThreadTask.h"
#include "Engine/Threading/ConcurrentTaskQueue.h"
#if USE_MONO
#include "Engine/Scripting/ManagedCLR/MUtils.h"
#include <mono/metadata/mono-gc.h>
#endif
#include "Engine/Scripting/ManagedCLR/MCore.h"
AssetReferenceBase::~AssetReferenceBase()
{
@@ -270,9 +267,7 @@ void Asset::OnManagedInstanceDeleted()
// Cleanup
if (_gcHandle)
{
#if USE_MONO
MUtils::FreeGCHandle(_gcHandle);
#endif
MCore::GCHandle::Free(_gcHandle);
_gcHandle = 0;
}