Browse Source

Fixed plugins that referenced other plugins (like BeatSaverDownloader)

refactor
andruzzzhka 6 years ago
parent
commit
5ab8983348
1 changed files with 11 additions and 4 deletions
  1. +11
    -4
      IllusionInjector/PluginManager.cs

+ 11
- 4
IllusionInjector/PluginManager.cs View File

@ -57,13 +57,20 @@ namespace IllusionInjector
}
}
String[] files = Directory.GetFiles(pluginDirectory, "*.dll");
foreach (string s in files)
//Copy plugins to .cache
string[] originalPlugins = Directory.GetFiles(pluginDirectory, "*.dll");
foreach (string s in originalPlugins)
{
string pluginCopy = pluginDirectory + "\\.cache" + s.Substring(s.LastIndexOf('\\'));
File.Copy(Path.Combine(pluginDirectory, s), pluginCopy);
_Plugins.AddRange(LoadPluginsFromFile(pluginCopy, exeName));
}
//Load copied plugins
string copiedPluginsDirectory = pluginDirectory + "\\.cache";
string[] copiedPlugins = Directory.GetFiles(copiedPluginsDirectory, "*.dll");
foreach (string s in copiedPlugins)
{
_Plugins.AddRange(LoadPluginsFromFile(s, exeName));
}


Loading…
Cancel
Save