diff --git a/BepInEx.Core/BepInEx.Core.csproj b/BepInEx.Core/BepInEx.Core.csproj
index c4f5cd0..30a9e20 100644
--- a/BepInEx.Core/BepInEx.Core.csproj
+++ b/BepInEx.Core/BepInEx.Core.csproj
@@ -12,6 +12,9 @@
+
+
+
diff --git a/BepInEx.Core/Bootstrap/BaseChainloader.cs b/BepInEx.Core/Bootstrap/BaseChainloader.cs
index bf8646b..6b62ffd 100644
--- a/BepInEx.Core/Bootstrap/BaseChainloader.cs
+++ b/BepInEx.Core/Bootstrap/BaseChainloader.cs
@@ -19,6 +19,8 @@ public abstract class BaseChainloader
private static Regex allowedGuidRegex { get; } = new(@"^[a-zA-Z0-9\._\-]+$");
+ internal BaseChainloader() { }
+
///
/// Analyzes the given type definition and attempts to convert it to a valid
///
@@ -369,6 +371,12 @@ public abstract class BaseChainloader
Logger.Log(LogLevel.Message, "Chainloader startup complete");
}
+ [Obsolete("Use a plugin provider instead", true)]
+ public IList LoadPlugins(params string[] pluginsPaths)
+ {
+ throw new NotSupportedException("Use a plugin provider instead");
+ }
+
private void LoadPlugins(List plugins, bool provider)
{
var existingPluginInfos = provider ? Providers : Plugins;
diff --git a/BepInEx.Core/Contract/IPlugin.cs b/BepInEx.Core/Contract/IPlugin.cs
index 6963150..150d151 100644
--- a/BepInEx.Core/Contract/IPlugin.cs
+++ b/BepInEx.Core/Contract/IPlugin.cs
@@ -1,23 +1,28 @@
-using BepInEx.Configuration;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using BepInEx.Configuration;
using BepInEx.Logging;
-namespace BepInEx.Contract;
-
-internal interface IPlugin
+namespace BepInEx.Contract
{
- ///
- /// Information about this plugin as it was loaded.
- ///
- PluginInfo Info { get; }
+ public interface IPlugin
+ {
+ ///
+ /// Information about this plugin as it was loaded.
+ ///
+ PluginInfo Info { get; }
- ///
- /// Logger instance tied to this plugin.
- ///
- ManualLogSource Log { get; }
+ ///
+ /// Logger instance tied to this plugin.
+ ///
+ ManualLogSource Logger { get; }
- ///
- /// Default config file tied to this plugin. The config file will not be created until
- /// any settings are added and changed, or is called.
- ///
- ConfigFile Config { get; }
+ ///
+ /// Default config file tied to this plugin. The config file will not be created until
+ /// any settings are added and changed, or is called.
+ ///
+ ConfigFile Config { get; }
+ }
}
diff --git a/BepInEx.Core/Utility.cs b/BepInEx.Core/Utility.cs
index 3ba6f1f..08e6c35 100644
--- a/BepInEx.Core/Utility.cs
+++ b/BepInEx.Core/Utility.cs
@@ -229,8 +229,6 @@ public static class Utility
/// True, if the symbols were found. Otherwise, false.
public static bool TryResolveAssemblySymbols(string dllPath, out byte[] symbolsData)
{
- symbolsData = null;
-
var subDirectory = Path.GetDirectoryName(dllPath);
var potentialSymbolsFileNames = new[]
@@ -257,6 +255,7 @@ public static class Utility
return true;
}
+ symbolsData = null;
return false;
}
diff --git a/BepInEx.PatcherProvider/BepInEx.PatcherProvider.csproj b/BepInEx.PatcherProvider/BepInEx.PatcherProvider.csproj
index a56204f..c37d3e6 100644
--- a/BepInEx.PatcherProvider/BepInEx.PatcherProvider.csproj
+++ b/BepInEx.PatcherProvider/BepInEx.PatcherProvider.csproj
@@ -4,6 +4,7 @@
net35;netstandard2.0
true
BepInEx patcher provider module
+ false
diff --git a/BepInEx.PluginProvider/BepInEx.PluginProvider.csproj b/BepInEx.PluginProvider/BepInEx.PluginProvider.csproj
index ee9c085..e22ed74 100644
--- a/BepInEx.PluginProvider/BepInEx.PluginProvider.csproj
+++ b/BepInEx.PluginProvider/BepInEx.PluginProvider.csproj
@@ -4,6 +4,7 @@
net35;netstandard2.0
true
BepInEx plugin provider module
+ false
diff --git a/Runtimes/NET/BepInEx.NET.Common/BasePlugin.cs b/Runtimes/NET/BepInEx.NET.Common/BasePlugin.cs
index 4356862..d9b375a 100644
--- a/Runtimes/NET/BepInEx.NET.Common/BasePlugin.cs
+++ b/Runtimes/NET/BepInEx.NET.Common/BasePlugin.cs
@@ -1,13 +1,12 @@
using System;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
-using BepInEx.Contract;
using BepInEx.Logging;
using HarmonyLib;
namespace BepInEx.NET.Common
{
- public abstract class BasePlugin : IPlugin
+ public abstract class BasePlugin
{
protected BasePlugin()
{
diff --git a/Runtimes/Unity/BepInEx.Unity.IL2CPP/BasePlugin.cs b/Runtimes/Unity/BepInEx.Unity.IL2CPP/BasePlugin.cs
index 825526b..1a0fda3 100644
--- a/Runtimes/Unity/BepInEx.Unity.IL2CPP/BasePlugin.cs
+++ b/Runtimes/Unity/BepInEx.Unity.IL2CPP/BasePlugin.cs
@@ -1,13 +1,11 @@
using System;
-using BepInEx.Bootstrap;
using BepInEx.Configuration;
-using BepInEx.Contract;
using BepInEx.Logging;
using Il2CppInterop.Runtime.InteropTypes;
namespace BepInEx.Unity.IL2CPP;
-public abstract class BasePlugin : IPlugin
+public abstract class BasePlugin
{
protected BasePlugin()
{
diff --git a/Runtimes/Unity/BepInEx.Unity.Mono/BaseUnityPlugin.cs b/Runtimes/Unity/BepInEx.Unity.Mono/BaseUnityPlugin.cs
index 3076c2a..21fde4f 100644
--- a/Runtimes/Unity/BepInEx.Unity.Mono/BaseUnityPlugin.cs
+++ b/Runtimes/Unity/BepInEx.Unity.Mono/BaseUnityPlugin.cs
@@ -1,7 +1,6 @@
using System;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
-using BepInEx.Contract;
using BepInEx.Logging;
using UnityEngine;
diff --git a/Runtimes/Unity/BepInEx.Unity.Mono/Bootstrap/UnityChainloader.cs b/Runtimes/Unity/BepInEx.Unity.Mono/Bootstrap/UnityChainloader.cs
index 1c163b9..19769e8 100644
--- a/Runtimes/Unity/BepInEx.Unity.Mono/Bootstrap/UnityChainloader.cs
+++ b/Runtimes/Unity/BepInEx.Unity.Mono/Bootstrap/UnityChainloader.cs
@@ -42,6 +42,12 @@ public class UnityChainloader : BaseChainloader
///
public static GameObject ManagerObject { get; private set; }
+ public static new UnityChainloader Instance
+ {
+ get => (UnityChainloader)BaseChainloader.Instance;
+ set => BaseChainloader.Instance = value;
+ }
+
protected override string ConsoleTitle => _consoleTitle;