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.

68 lines
2.1 KiB

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