Skip to content

Commit

Permalink
Update ModAssembly.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
xen-42 committed Dec 5, 2023
1 parent f348f76 commit 3423789
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Winch/Core/ModAssembly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ private void ProcessPreload()
string preloadTypeName = preloadSetting.Split('/')[0];
string preloadMethodName = preloadSetting.Split('/')[1];

Type entrypointType = LoadedAssembly?.GetType(preloadTypeName) ??
Type preloaderType = LoadedAssembly?.GetType(preloadTypeName) ??
throw new EntryPointNotFoundException($"Could not find type {preloadTypeName} in Mod Assembly");
MethodInfo preloader = entrypointType.GetMethod(preloadMethodName) ??
MethodInfo preloader = preloaderType.GetMethod(preloadMethodName) ??
throw new EntryPointNotFoundException($"Could not find method {preloadTypeName} in type {preloadTypeName} in Mod Assembly");

WinchCore.Log.Debug($"Invoking preloader {entrypointType}.{preloadMethodName}...");
WinchCore.Log.Debug($"Invoking preloader {preloaderType}.{preloadMethodName}...");
preloader.Invoke(null, new object[0]);
}
}
Expand Down

0 comments on commit 3423789

Please sign in to comment.