From c21a39a886baf726b3caaa0e8a2a5c9b1bb8a2d4 Mon Sep 17 00:00:00 2001 From: desktop-maesty/steve Date: Fri, 22 Feb 2019 14:07:37 +1000 Subject: [PATCH] Corrected UNITY_EDITOR define usage in flowchart and block --- Assets/Fungus/Scripts/Components/Block.cs | 2 +- Assets/Fungus/Scripts/Components/Flowchart.cs | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Assets/Fungus/Scripts/Components/Block.cs b/Assets/Fungus/Scripts/Components/Block.cs index c1163799..ef780a76 100644 --- a/Assets/Fungus/Scripts/Components/Block.cs +++ b/Assets/Fungus/Scripts/Components/Block.cs @@ -112,11 +112,11 @@ namespace Fungus } } +#endif //editor only state for speeding up flowchart window drawing public bool IsSelected { get; set; } //local cache of selectedness public bool IsFiltered { get; set; } //local cache of filteredness public bool IsControlSelected { get; set; } //local cache of being part of the control exclusion group -#endif #region Public members diff --git a/Assets/Fungus/Scripts/Components/Flowchart.cs b/Assets/Fungus/Scripts/Components/Flowchart.cs index 7d241845..0f72d38e 100644 --- a/Assets/Fungus/Scripts/Components/Flowchart.cs +++ b/Assets/Fungus/Scripts/Components/Flowchart.cs @@ -339,7 +339,6 @@ namespace Fungus /// public virtual Rect ScrollViewRect { get { return scrollViewRect; } set { scrollViewRect = value; } } -#if UNITY_EDITOR /// /// Current actively selected block in the Flowchart editor. /// @@ -361,7 +360,6 @@ namespace Fungus public virtual List SelectedBlocks { get { return selectedBlocks; } set { selectedBlocks = value; } } -#endif /// /// Currently selected command in the Flowchart editor. /// @@ -1125,8 +1123,7 @@ namespace Fungus #endif } } - -#if UNITY_EDITOR + /// /// Clears the list of selected blocks. /// @@ -1173,8 +1170,7 @@ namespace Fungus var res = gameObject.GetComponents(); selectedBlocks = res.Where(x => x.IsSelected).ToList(); } - -#endif + /// /// Reset the commands and variables in the Flowchart. ///