IncludeInBuildOption.cs 1.2 KB

123456789101112131415161718192021222324
  1. using UnityEditor;
  2. namespace SingularityGroup.HotReload.Editor {
  3. internal class IncludeInBuildOption : ProjectOptionBase, ISerializedProjectOption {
  4. static IncludeInBuildOption _I;
  5. public static IncludeInBuildOption I = _I ?? (_I = new IncludeInBuildOption());
  6. public override string ShortSummary => "Include Hot Reload in player builds";
  7. public override string Summary => ShortSummary;
  8. public override string ObjectPropertyName =>
  9. nameof(HotReloadSettingsObject.IncludeInBuild);
  10. public override void InnerOnGUI(SerializedObject so) {
  11. string description;
  12. if (GetValue(so)) {
  13. description = "The Hot Reload runtime is included in development builds that use the Mono scripting backend.";
  14. } else {
  15. description = "The Hot Reload runtime will not be included in any build. Use this option to disable HotReload without removing it from your project.";
  16. }
  17. description += " This option does not affect Hot Reload usage in Playmode";
  18. EditorGUILayout.LabelField(description, HotReloadWindowStyles.WrapStyle);
  19. }
  20. }
  21. }