OptionInterfaces.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. using UnityEditor;
  2. namespace SingularityGroup.HotReload.Editor {
  3. public interface IOption {
  4. string ShortSummary { get; }
  5. string Summary { get; }
  6. /// <param name="so">The <see cref="HotReloadSettingsObject"/> wrapped by SerializedObject</param>
  7. bool GetValue(SerializedObject so);
  8. /// <summary>
  9. /// Handle the new value.
  10. /// </summary>
  11. /// <remarks>
  12. /// Note: caller must skip calling this if value same as GetValue!
  13. /// </remarks>
  14. /// <param name="so">The <see cref="HotReloadSettingsObject"/> wrapped by SerializedObject</param>
  15. /// <param name="value"></param>
  16. void SetValue(SerializedObject so, bool value);
  17. /// <param name="so">The <see cref="HotReloadSettingsObject"/> wrapped by SerializedObject</param>
  18. void InnerOnGUI(SerializedObject so);
  19. }
  20. /// <summary>
  21. /// An option scoped to the current Unity project.
  22. /// </summary>
  23. /// <remarks>
  24. /// These options are intended to be shared with collaborators and used by Unity Player builds.
  25. /// </remarks>
  26. public interface ISerializedProjectOption {
  27. string ObjectPropertyName { get; }
  28. }
  29. }