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.

71 lines
2.1 KiB

  1. using IllusionPlugin.BeatSaber;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. using UnityEngine.SceneManagement;
  6. namespace IllusionPlugin
  7. {
  8. /// <summary>
  9. /// Interface for Beat Saber plugins. Every class that implements this will be loaded if the DLL is placed at
  10. /// data/Managed/Plugins.
  11. /// </summary>
  12. public interface IBeatSaberPlugin
  13. {
  14. /// <summary>
  15. /// Gets the name of the plugin.
  16. /// </summary>
  17. string Name { get; }
  18. /// <summary>
  19. /// Gets the version of the plugin.
  20. /// </summary>
  21. string Version { get; }
  22. /// <summary>
  23. /// Gets the info for the Modsaber release of this plugin. Return null if there is no Modsaber release.
  24. /// </summary>
  25. ModsaberModInfo ModInfo { get; }
  26. /// <summary>
  27. /// Gets invoked when the application is started.
  28. /// </summary>
  29. void OnApplicationStart();
  30. /// <summary>
  31. /// Gets invoked when the application is closed.
  32. /// </summary>
  33. void OnApplicationQuit();
  34. /// <summary>
  35. /// Gets invoked on every graphic update.
  36. /// </summary>
  37. void OnUpdate();
  38. /// <summary>
  39. /// Gets invoked on ever physics update.
  40. /// </summary>
  41. void OnFixedUpdate();
  42. /// <summary>
  43. /// Gets invoked whenever a scene is loaded.
  44. /// </summary>
  45. /// <param name="scene">The scene currently loaded</param>
  46. /// <param name="sceneMode">The type of loading</param>
  47. void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode);
  48. /// <summary>
  49. /// Gets invoked whenever a scene is unloaded
  50. /// </summary>
  51. /// <param name="scene">The unloaded scene</param>
  52. void OnSceneUnloaded(Scene scene);
  53. /// <summary>
  54. /// Gets invoked whenever a scene is changed
  55. /// </summary>
  56. /// <param name="prevScene">The Scene that was previously loaded</param>
  57. /// <param name="nextScene">The Scene being loaded</param>
  58. void OnActiveSceneChanged(Scene prevScene, Scene nextScene);
  59. }
  60. }