BaseUnityPlugin.cs 423 B

1234567891011121314151617181920
  1. using BepInEx.Logging;
  2. using UnityEngine;
  3. namespace BepInEx
  4. {
  5. /// <summary>
  6. /// The base plugin type that is used by the BepInEx plugin loader.
  7. /// </summary>
  8. public abstract class BaseUnityPlugin : MonoBehaviour
  9. {
  10. protected ManualLogSource Logger { get; }
  11. protected BaseUnityPlugin()
  12. {
  13. var metadata = MetadataHelper.GetMetadata(this);
  14. Logger = Logging.Logger.CreateLogSource(metadata.Name);
  15. }
  16. }
  17. }