Fix console builds
This commit is contained in:
@@ -739,10 +739,9 @@ ScriptingObject* Scripting::NewObject(const MClass* type)
|
|||||||
LOG(Error, "Invalid type.");
|
LOG(Error, "Invalid type.");
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
MonoClass* typeClass = type->GetNative();
|
|
||||||
|
|
||||||
#if USE_MONO
|
#if USE_MONO
|
||||||
// Get the assembly with that class
|
// Get the assembly with that class
|
||||||
|
MonoClass* typeClass = type->GetNative();
|
||||||
auto module = ManagedBinaryModule::FindModule(typeClass);
|
auto module = ManagedBinaryModule::FindModule(typeClass);
|
||||||
if (module == nullptr)
|
if (module == nullptr)
|
||||||
{
|
{
|
||||||
@@ -767,11 +766,11 @@ ScriptingObject* Scripting::NewObject(const MClass* type)
|
|||||||
LOG(Error, "Failed to spawn object of type \'{0}.{1}\'.", String(mono_class_get_namespace(typeClass)), String(mono_class_get_name(typeClass)));
|
LOG(Error, "Failed to spawn object of type \'{0}.{1}\'.", String(mono_class_get_namespace(typeClass)), String(mono_class_get_name(typeClass)));
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
return obj;
|
||||||
#else
|
#else
|
||||||
LOG(Error, "Not supported object creation from Managed class.");
|
LOG(Error, "Not supported object creation from Managed class.");
|
||||||
|
return nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return obj;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FLAXENGINE_API ScriptingObject* FindObject(const Guid& id, MClass* type)
|
FLAXENGINE_API ScriptingObject* FindObject(const Guid& id, MClass* type)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include "Engine/Platform/CPUInfo.h"
|
#include "Engine/Platform/CPUInfo.h"
|
||||||
#include "Engine/Platform/Thread.h"
|
#include "Engine/Platform/Thread.h"
|
||||||
#include "Engine/Platform/ConditionVariable.h"
|
#include "Engine/Platform/ConditionVariable.h"
|
||||||
|
#include "Engine/Core/Collections/Dictionary.h"
|
||||||
#include "Engine/Engine/EngineService.h"
|
#include "Engine/Engine/EngineService.h"
|
||||||
#include "Engine/Profiler/ProfilerCPU.h"
|
#include "Engine/Profiler/ProfilerCPU.h"
|
||||||
#include "Engine/Scripting/ManagedCLR/MCore.h"
|
#include "Engine/Scripting/ManagedCLR/MCore.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user