Browse Source

Merge pull request #682 from stevehalliwell/DisabledFlowchartEventHandler

Disabled Flowcharts and EventHandlers
master
Chris Gregan 7 years ago committed by GitHub
parent
commit
cbbec4f901
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      Assets/Fungus/Scripts/Components/EventHandler.cs

6
Assets/Fungus/Scripts/Components/EventHandler.cs

@ -65,6 +65,12 @@ namespace Fungus
var flowchart = ParentBlock.GetFlowchart(); var flowchart = ParentBlock.GetFlowchart();
//if somehow the flowchart is invalid or has been disabled we don't want to continue
if(flowchart == null || !flowchart.isActiveAndEnabled)
{
return false;
}
// Auto-follow the executing block if none is currently selected // Auto-follow the executing block if none is currently selected
if (flowchart.SelectedBlock == null) if (flowchart.SelectedBlock == null)
{ {

Loading…
Cancel
Save