mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-19 15:51:45 +00:00
Use the IL2CPPChainLoader instance for il2cpp to preserve compatibility
This commit is contained in:
1 parent
e9337e9982
commit
d44b93ba93
2 files changed
+6
-2
No files matched your search
@@ -13,7 +13,7 @@ public abstract class BasePlugin : IPlugin
|
||||
{
|
||||
var metadata = MetadataHelper.GetMetadata(this);
|
||||
|
||||
if (BaseChainloader<BasePlugin>.Instance.Plugins.TryGetValue(metadata.GUID, out var pluginInfo))
|
||||
if (IL2CPPChainloader.Instance.Plugins.TryGetValue(metadata.GUID, out var pluginInfo))
|
||||
{
|
||||
Info = pluginInfo;
|
||||
Info.Instance = this;
|
||||
|
||||
@@ -32,7 +32,11 @@ public class IL2CPPChainloader : BaseChainloader<BasePlugin>
|
||||
|
||||
private static INativeDetour RuntimeInvokeDetour { get; set; }
|
||||
|
||||
public static new IL2CPPChainloader Instance { get; set; }
|
||||
public static new IL2CPPChainloader Instance
|
||||
{
|
||||
get => (IL2CPPChainloader)BaseChainloader<BasePlugin>.Instance;
|
||||
set => BaseChainloader<BasePlugin>.Instance = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Register and add a Unity Component (for example MonoBehaviour) into BepInEx global manager.
|
||||
|
||||
Reference in new issue
Block a user