Use the IL2CPPChainLoader instance for il2cpp to preserve compatibility

This commit is contained in:
aldelaro5 committed 2024-09-01 22:56:30 -04:00
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.