Browse Source

Block Selector now ordered by BlockName

master
shalliwell 5 years ago
parent
commit
5c575ccf71
  1. 4
      Assets/Fungus/Scripts/Editor/BlockEditor.cs

4
Assets/Fungus/Scripts/Editor/BlockEditor.cs

@ -454,6 +454,8 @@ namespace Fungus.EditorUtils
int selectedIndex = 0;
blockNames.Add(nullLabel);
var blocks = flowchart.GetComponents<Block>();
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<Block>();
blocks = blocks.OrderBy(x => x.BlockName).ToArray();
for (int i = 0; i < blocks.Length; ++i)
{
blockNames.Add(new GUIContent(blocks[i].BlockName));

Loading…
Cancel
Save