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.2 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using UnityEngine.SceneManagement;
  5. namespace IllusionPlugin
  6. {
  7. /// <summary>
  8. /// Interface for Beat Saber plugins. Every class that implements this will be loaded if the DLL is placed at
  9. /// data/Managed/Plugins.
  10. /// </summary>
  11. public interface IBeatSaberPlugin
  12. {
  13. /// <summary>
  14. /// Gets the name of the plugin.
  15. /// </summary>
  16. string Name { get; }
  17. /// <summary>
  18. /// Gets the version of the plugin.
  19. /// </summary>
  20. Version Version { get; }
  21. /// <summary>
  22. /// The URI to the update script for the plugin. May be <see langword="null"/>.
  23. /// Actually tho this does nothing I just don't want to try to remove it completely
  24. /// </summary>
  25. Uri UpdateUri { 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. }