Browse Source

Additional flowcharts added to the scene no longer have their initial block start with the default 'Game Started' event.

master
Brian Dean Jennings 10 years ago
parent
commit
0a0d53284d
  1. 6
      Assets/Fungus/Flowchart/Scripts/Flowchart.cs

6
Assets/Fungus/Flowchart/Scripts/Flowchart.cs

@ -261,6 +261,12 @@ namespace Fungus
protected virtual void Initialize()
{
// If there are other flowcharts in the scene and the selected block has the default name, then this is probably a new block.
// Reset the event handler of the new flowchart's default block to avoid crashes.
if (selectedBlock && cachedFlowcharts.Count > 1 && selectedBlock.name == "New Block")
{
selectedBlock.eventHandler = null;
}
}
protected virtual Block CreateBlockComponent(GameObject parent)

Loading…
Cancel
Save