BaseUnityPlugin.cs 639 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using UnityEngine;
  6. using UnityEngine.SceneManagement;
  7. namespace BepInEx
  8. {
  9. public abstract class BaseUnityPlugin : MonoBehaviour
  10. {
  11. public abstract string Name { get; }
  12. protected virtual void OnEnable()
  13. {
  14. SceneManager.sceneLoaded += LevelFinishedLoading;
  15. }
  16. protected virtual void OnDisable()
  17. {
  18. SceneManager.sceneLoaded -= LevelFinishedLoading;
  19. }
  20. protected virtual void LevelFinishedLoading(Scene scene, LoadSceneMode mode)
  21. {
  22. }
  23. }
  24. }