diff --git a/Assets/Fungus/Scripts/Editor/BlockEditor.cs b/Assets/Fungus/Scripts/Editor/BlockEditor.cs index 7a425cfe..38119cdb 100644 --- a/Assets/Fungus/Scripts/Editor/BlockEditor.cs +++ b/Assets/Fungus/Scripts/Editor/BlockEditor.cs @@ -454,6 +454,8 @@ namespace Fungus.EditorUtils int selectedIndex = 0; blockNames.Add(nullLabel); var blocks = flowchart.GetComponents(); + blocks = blocks.OrderBy(x => x.BlockName).ToArray(); + for (int i = 0; i < blocks.Length; ++i) { blockNames.Add(new GUIContent(blocks[i].BlockName)); @@ -492,6 +494,8 @@ namespace Fungus.EditorUtils int selectedIndex = 0; blockNames.Add(nullLabel); Block[] blocks = flowchart.GetComponents(); + blocks = blocks.OrderBy(x => x.BlockName).ToArray(); + for (int i = 0; i < blocks.Length; ++i) { blockNames.Add(new GUIContent(blocks[i].BlockName));