mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 11:39:43 +00:00
29 lines
719 B
C#
29 lines
719 B
C#
using System;
|
|
using System.Reflection;
|
|
using BepInEx.Bootstrap;
|
|
using BepInEx.Preloader.Core.Logging;
|
|
|
|
namespace BepInEx.NetLauncher.Common
|
|
{
|
|
public class NetChainloader : BaseChainloader<BasePlugin>
|
|
{
|
|
public override BasePlugin LoadPlugin(PluginInfo pluginInfo, Assembly pluginAssembly)
|
|
{
|
|
var type = pluginAssembly.GetType(pluginInfo.TypeName);
|
|
|
|
var pluginInstance = (BasePlugin)Activator.CreateInstance(type);
|
|
|
|
pluginInstance.Load();
|
|
|
|
return pluginInstance;
|
|
}
|
|
|
|
protected override void InitializeLoggers()
|
|
{
|
|
base.InitializeLoggers();
|
|
|
|
ChainloaderLogHelper.RewritePreloaderLogs();
|
|
}
|
|
}
|
|
}
|