Fix for .Net Core failing to load StereoKitC.dll when working directory is not the same as the exe folder.
@@ -31,7 +31,7 @@ namespace StereoKit
static extern IntPtr LoadLibraryW(string fileName);
static bool LoadWindows(string arch)
{
- if (LoadLibraryW($"runtimes/win-{arch}/native/StereoKitC.dll") != IntPtr.Zero) return true;
+ if (LoadLibraryW($"{AppDomain.CurrentDomain.BaseDirectory}/runtimes/win-{arch}/native/StereoKitC.dll") != IntPtr.Zero) return true;
if (LoadLibraryW("StereoKitC") != IntPtr.Zero) return true;
return false;
}
