You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.2 KiB

  1. using IPA;
  2. using UnityEngine.SceneManagement;
  3. using IPALogger = IPA.Logging.Logger;
  4. using BSIPA_ModList.UI;
  5. using UnityEngine;
  6. namespace BSIPA_ModList
  7. {
  8. internal static class Logger
  9. {
  10. internal static IPALogger log { get; set; }
  11. }
  12. public class Plugin : IBeatSaberPlugin
  13. {
  14. public void Init(IPALogger logger)
  15. {
  16. Logger.log = logger;
  17. IPA.Updating.BeatMods.Updater.ModListPresent = true;
  18. }
  19. public void OnActiveSceneChanged(Scene prevScene, Scene nextScene)
  20. {
  21. }
  22. public void OnApplicationQuit()
  23. {
  24. }
  25. public void OnApplicationStart()
  26. {
  27. }
  28. public void OnFixedUpdate()
  29. {
  30. }
  31. public void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode)
  32. {
  33. if (scene.name == "MenuCore")
  34. {
  35. FloatingNotification.Create();
  36. if (ButtonUI.Instance == null)
  37. new GameObject("BSIPA Mod List Object").AddComponent<ButtonUI>().Init();
  38. }
  39. }
  40. public void OnSceneUnloaded(Scene scene)
  41. {
  42. }
  43. public void OnUpdate()
  44. {
  45. }
  46. }
  47. }