Fixed issues where scripts cannot be loaded if another instance of the engine is using it #441
|
@ -116,8 +116,9 @@ namespace SHADE
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
oss << "[EngineInterface] Loading " << Convert::ToNative(ManagedLibraryName) << ".dll";
|
oss << "[EngineInterface] Loading " << Convert::ToNative(ManagedLibraryName) << ".dll";
|
||||||
managedLibFile = File::Open(managedLibPath, FileMode::Open, FileAccess::Read);
|
managedLibFile = File::Open(managedLibPath, FileMode::Open, FileAccess::Read, FileShare::Read);
|
||||||
scriptContext->LoadFromStream(managedLibFile);
|
scriptContext->LoadFromStream(managedLibFile);
|
||||||
|
managedLibFile->Close();
|
||||||
oss.str("");
|
oss.str("");
|
||||||
oss << "[EngineInterface] Successfully loaded " << Convert::ToNative(ManagedLibraryName) << ".dll";
|
oss << "[EngineInterface] Successfully loaded " << Convert::ToNative(ManagedLibraryName) << ".dll";
|
||||||
Debug::Log(oss.str());
|
Debug::Log(oss.str());
|
||||||
|
|
Loading…
Reference in New Issue