fix imgui and plugin loading
This commit is contained in:
@@ -12,17 +12,21 @@ while (!Debugger.IsAttached)
|
||||
|
||||
VelopackApp.Build().Run();
|
||||
|
||||
#if DEBUG
|
||||
AssemblyLoadContext.Default.Resolving += (loadContext, name) =>
|
||||
{
|
||||
Debug.WriteLine($"resolving {name} in {loadContext}");
|
||||
return null;
|
||||
};
|
||||
#endif
|
||||
|
||||
var dir = Path.GetDirectoryName(args[0])!;
|
||||
var context = new GameDirectoryAssemblyLoadContext(dir);
|
||||
|
||||
// a list of assemblies which are not in the game binaries but reference them
|
||||
context.AddDependencyOverride("CringeLauncher");
|
||||
context.AddDependencyOverride("PluginLoader");
|
||||
context.AddDependencyOverride("CringePlugins");
|
||||
|
||||
var launcher = context.LoadFromAssemblyName(new AssemblyName("CringeLauncher"));
|
||||
|
||||
|
Reference in New Issue
Block a user