using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Contract; using BepInEx.Logging; using UnityEngine; namespace BepInEx { /// /// The base plugin type that is used by the BepInEx plugin loader. /// public abstract class BaseUnityPlugin : MonoBehaviour { protected ManualLogSource Logger { get; } protected ConfigFile Config { get; } protected PluginInfo Info { get; } protected BaseUnityPlugin() { var metadata = MetadataHelper.GetMetadata(this); Info = Chainloader.PluginInfos[metadata.GUID]; Logger = Logging.Logger.CreateLogSource(metadata.Name); Config = new ConfigFile(Utility.CombinePaths(Paths.ConfigPath, metadata.GUID + ".cfg"), false); } } }