mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Don't resolve plugin info from chainloader in Unity Editor
This commit is contained in:
1 parent
2b102fd166
commit
82d8daeac1
1 file changed
+3
-2
@@ -36,7 +36,7 @@ namespace BepInEx
|
||||
if(metadata == null)
|
||||
throw new InvalidOperationException("Can't create an instance of " + GetType().FullName + " because it inherits from BaseUnityPlugin and the BepInPlugin attribute is missing.");
|
||||
|
||||
if (Chainloader.PluginInfos.TryGetValue(metadata.GUID, out var info))
|
||||
if (!Application.isEditor && Chainloader.PluginInfos.TryGetValue(metadata.GUID, out var info))
|
||||
Info = info;
|
||||
else
|
||||
{
|
||||
@@ -52,7 +52,8 @@ namespace BepInEx
|
||||
|
||||
Logger = Logging.Logger.CreateLogSource(metadata.Name);
|
||||
|
||||
Config = new ConfigFile(Utility.CombinePaths(Paths.ConfigPath, metadata.GUID + ".cfg"), false, metadata);
|
||||
string configRoot = Application.isEditor ? "." : Paths.ConfigPath;
|
||||
Config = new ConfigFile(Utility.CombinePaths(configRoot, metadata.GUID + ".cfg"), false, metadata);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user