diff --git a/Assets/Fungus/Editor/FungusScript/FungusEditorWindow.cs b/Assets/Fungus/Editor/FungusScript/FungusEditorWindow.cs index 1ba9d4ba..00d16641 100755 --- a/Assets/Fungus/Editor/FungusScript/FungusEditorWindow.cs +++ b/Assets/Fungus/Editor/FungusScript/FungusEditorWindow.cs @@ -129,7 +129,7 @@ namespace Fungus.Script string labelText = fungusScript.name; if (Application.isPlaying) { - if (fungusScript.activeSequence == null) + if (fungusScript.executingSequence == null) { GUI.backgroundColor = Color.white; labelText += " (Idle)"; diff --git a/Assets/Fungus/VisualScripting/FungusScript.cs b/Assets/Fungus/VisualScripting/FungusScript.cs index 690beaeb..9f36cd52 100644 --- a/Assets/Fungus/VisualScripting/FungusScript.cs +++ b/Assets/Fungus/VisualScripting/FungusScript.cs @@ -16,12 +16,13 @@ namespace Fungus.Script public Sequence startSequence; [System.NonSerialized] - public Sequence activeSequence; + public Sequence executingSequence; public bool startAutomatically = false; public List variables = new List(); + void Start() { if (startAutomatically) @@ -51,7 +52,7 @@ namespace Fungus.Script Selection.activeGameObject = sequence.gameObject; #endif - activeSequence = sequence; + executingSequence = sequence; sequence.ExecuteNextCommand(); } } diff --git a/Assets/Fungus/VisualScripting/Sequence.cs b/Assets/Fungus/VisualScripting/Sequence.cs index 8e695fb7..99540a0b 100644 --- a/Assets/Fungus/VisualScripting/Sequence.cs +++ b/Assets/Fungus/VisualScripting/Sequence.cs @@ -63,12 +63,12 @@ namespace Fungus.Script public bool IsRunning() { if (fungusScript == null || - fungusScript.activeSequence == null) + fungusScript.executingSequence == null) { return false; } - return (fungusScript.activeSequence == this); + return (fungusScript.executingSequence == this); } public int GetExecutionCount() @@ -130,7 +130,7 @@ namespace Fungus.Script public void Stop() { activeCommand = null; - fungusScript.activeSequence = null; + fungusScript.executingSequence = null; // No more commands to run in current sequence #if UNITY_EDITOR