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.

79 lines
2.4 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. #if OLD_UPDATER
  23. /// <summary>
  24. /// The URI to the update script for the plugin. May be <see langword="null"/>.
  25. /// Actually tho this does nothing I just don't want to try to remove it completely
  26. /// </summary>
  27. Uri UpdateUri { get; }
  28. #endif
  29. /// <summary>
  30. /// Gets the info for the Modsaber release of this plugin.
  31. /// </summary>
  32. ModsaberModInfo ModInfo { get; }
  33. /// <summary>
  34. /// Gets invoked when the application is started.
  35. /// </summary>
  36. void OnApplicationStart();
  37. /// <summary>
  38. /// Gets invoked when the application is closed.
  39. /// </summary>
  40. void OnApplicationQuit();
  41. /// <summary>
  42. /// Gets invoked on every graphic update.
  43. /// </summary>
  44. void OnUpdate();
  45. /// <summary>
  46. /// Gets invoked on ever physics update.
  47. /// </summary>
  48. void OnFixedUpdate();
  49. /// <summary>
  50. /// Gets invoked whenever a scene is loaded.
  51. /// </summary>
  52. /// <param name="scene">The scene currently loaded</param>
  53. /// <param name="sceneMode">The type of loading</param>
  54. void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode);
  55. /// <summary>
  56. /// Gets invoked whenever a scene is unloaded
  57. /// </summary>
  58. /// <param name="scene">The unloaded scene</param>
  59. void OnSceneUnloaded(Scene scene);
  60. /// <summary>
  61. /// Gets invoked whenever a scene is changed
  62. /// </summary>
  63. /// <param name="prevScene">The Scene that was previously loaded</param>
  64. /// <param name="nextScene">The Scene being loaded</param>
  65. void OnActiveSceneChanged(Scene prevScene, Scene nextScene);
  66. }
  67. }