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.

66 lines
2.0 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 generic Illusion unity plugins. Every class that implements this will be loaded if the DLL is placed at
  9. /// data/Managed/Plugins.
  10. /// </summary>
  11. public interface IPlugin
  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. string Version { get; }
  21. /// <summary>
  22. /// Gets invoked when the application is started.
  23. /// </summary>
  24. void OnApplicationStart();
  25. /// <summary>
  26. /// Gets invoked when the application is closed.
  27. /// </summary>
  28. void OnApplicationQuit();
  29. /// <summary>
  30. /// Gets invoked whenever a scene is loaded.
  31. /// </summary>
  32. /// <param name="scene">The scene currently loaded</param>
  33. /// <param name="sceneMode">The type of loading</param>
  34. void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode);
  35. /// <summary>
  36. /// Gets invoked whenever a scene is unloaded
  37. /// </summary>
  38. /// <param name="scene">The unloaded scene</param>
  39. void OnSceneUnloaded(Scene scene);
  40. /// <summary>
  41. /// Gets invoked whenever a scene is changed
  42. /// </summary>
  43. /// <param name="prevScene">The Scene that was previously loaded</param>
  44. /// <param name="nextScene">The Scene being loaded</param>
  45. void OnActiveSceneChanged(Scene prevScene, Scene nextScene);
  46. /// <summary>
  47. /// Gets invoked on every graphic update.
  48. /// </summary>
  49. void OnUpdate();
  50. /// <summary>
  51. /// Gets invoked on ever physics update.
  52. /// </summary>
  53. void OnFixedUpdate();
  54. }
  55. }