Closed mpstark closed 5 years ago
Shadow copying (in theory) should already prevent this... https://docs.microsoft.com/en-us/dotnet/framework/app-domains/shadow-copy-assemblies
Something like this...
var appDom = AppDomain.CurrentDomain;
appDom.SetShadowCopyFiles();
appDom.SetCachePath(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Cache"));
I think Mono implements this correctly, although the methods are marked as [Obsolete]
with a recommendation to go the AppDomainSetup route, I think that only works for new domains and not for the current domain.
It's worth a shot to see if this works in this version of Unity.
Can use
Assembly.Load(byte[])
I believe to prevent file locks.