public override void OnInspectorGUI()
        {
            DungeonArchetype archetype = target as DungeonArchetype;

            if (archetype == null)
            {
                return;
            }

            EditorGUILayout.BeginVertical("box");

            EditorUtil.DrawIntRange("Branching Depth", archetype.BranchingDepth);
            EditorUtil.DrawIntRange("Branch Count", archetype.BranchCount);
            archetype.StraightenChance = EditorGUILayout.Slider("Straighten", archetype.StraightenChance, 0.0f, 1.0f);

            EditorGUILayout.EndVertical();

            EditorGUILayout.Space();
            EditorGUILayout.Space();

            EditorUtil.DrawObjectList <TileSet>("Tile Sets", archetype.TileSets, GameObjectSelectionTypes.Prefab);

            EditorGUILayout.Space();
            EditorGUILayout.Space();

            EditorGUILayout.HelpBox("Specific tiles can be set to appear at the end of branch paths. The cap type can be used to control if these tiles are used \"instead of\" or \"aswell as\" the standard tile sets listed above", MessageType.Info);

            archetype.BranchCapType = (BranchCapType)EditorGUILayout.EnumPopup("Branch Cap Type", archetype.BranchCapType);
            EditorUtil.DrawObjectList <TileSet>("Branch-Cap Tile Sets", archetype.BranchCapTileSets, GameObjectSelectionTypes.Prefab);

            if (GUI.changed)
            {
                EditorUtility.SetDirty(archetype);
            }
        }
        /// <summary>
        /// Creates the default graph
        /// </summary>
        public void Reset()
        {
            var emptyTileSet   = new TileSet[0];
            var emptyArchetype = new DungeonArchetype[0];

            var builder = new DungeonFlowBuilder(this)
                          .AddNode(emptyTileSet, "Start")
                          .AddLine(emptyArchetype, 1.0f)
                          .AddNode(emptyTileSet, "Goal");

            builder.Complete();
        }
 /// <summary>
 /// Adds a new line segment to the flow graph. A line segment represents one or more rooms in a path between two nodes
 /// </summary>
 /// <param name="archetype">An archetype to pull rooms from</param>
 /// <param name="length">The length of this line segment. The entire path length will be automatically normalized. Must be greater than zero</param>
 /// <param name="locks">An optional list of the locks that can be applied to this segment</param>
 /// <param name="keys">An optional list of the keys that can be placed in this segment</param>
 /// <returns></returns>
 public DungeonFlowBuilder AddLine(DungeonArchetype archetype, float length = 1f, IEnumerable <KeyLockPlacement> locks = null, IEnumerable <KeyLockPlacement> keys = null)
 {
     return(AddLine(new DungeonArchetype[] { archetype }, length, locks, keys));
 }