public int EditorLoadBoardSetupFromHierarchy(Match3BoardPiece[,] gridDestination)
    {
        // Iterate through all the child board pieces
        Match3BoardPiece[] childBoardPieces = GetComponentsInChildren <Match3BoardPiece>(true);
        for (int i = 0; i < childBoardPieces.Length; i++)
        {
            BoardCoord boardPos = BoardCoord.ParseCoordFromString(childBoardPieces[i].name);
            // Set this board piece in the corresponding Board position
            gridDestination[boardPos.row, boardPos.col] = childBoardPieces[i];
            childBoardPieces[i].editorBoardPos          = boardPos;
        }

        // Return the number of board pieces found.
        return(childBoardPieces.Length);
    }
    /// <summary>
    /// Scans the hierarchy children of the board renderer and sets up the BoardData accordingly.
    /// </summary>
    public void LoadBoardSetupFromHierarchy()
    {
//		List<Match3Tile> tilesPlacedAtDesignTime = new List<Match3Tile>(30);

        // Enable all the board pieces and initialize them
        Match3BoardPiece[] childBoardPieces = GetComponentsInChildren <Match3BoardPiece>(true);
        for (int i = 0; i < childBoardPieces.Length; i++)
        {
            childBoardPieces[i].gameObject.SetActive(true);
            childBoardPieces[i].InitComponent(this);

            // Destroy tiles that are on board pieces that have a spawn rule.
            // Leave only custom configured tiles that are on board pieces without any spawn RuleEntries.
            if (childBoardPieces[i].Tile != null && childBoardPieces[i].initialTileSpawnRule.ruleEntries.Count > 0)
            {
//				Debug.LogWarning("Destroying " + childBoardPieces[i].Tile.name);
                DestroyImmediate(childBoardPieces[i].Tile.gameObject);
            }
            else if (childBoardPieces[i].Tile != null)
            {
                // If we let the tile placed by the designer, we need to manually activate it and initialize it later.
//				tilesPlacedAtDesignTime.Add(childBoardPieces[i].Tile as Match3Tile);
                childBoardPieces[i].Tile.gameObject.SetActive(true);
//				Debug.LogWarning("Activated custom tile: " + childBoardPieces[i].Tile.name);
            }

            BoardCoord boardPos = BoardCoord.ParseCoordFromString(childBoardPieces[i].name);
            // Set this board piece in the corresponding Board position
            Board[boardPos] = childBoardPieces[i];
        }

//		// Manually activate and initialize tiles placed at design time. (not spawned by the game)
//		for(int i = 0; i < tilesPlacedAtDesignTime.Count; i++)
//		{
//			tilesPlacedAtDesignTime[i].gameObject.SetActive(true);
//			tilesPlacedAtDesignTime[i].InitComponent();
//		}
    }