Skip to content

Commit

Permalink
Added preloader
Browse files Browse the repository at this point in the history
  • Loading branch information
pipe01 committed May 19, 2018
1 parent bc3590f commit 0bc35f6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Bootstrap/ModLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ public static Mod GetMod(string modPath)

Assembly ass = Assembly.Load(File.ReadAllBytes(modPath));

var preloader = ass.GetType("Preloader");
var preload = preloader?.GetMethod("Preload", BindingFlags.Public | BindingFlags.Static);

if (preload != null)
preload.Invoke(null, null);

Mod mod = null;

foreach (var item in ass.GetExportedTypes())
Expand Down

0 comments on commit 0bc35f6

Please sign in to comment.