private void DisplayAutotiling()
        {
            if (Tileset.SelectedBrushId != Tileset.k_BrushId_Default)
            {
                TilesetBrush brush = Tileset.FindBrush(Tileset.SelectedBrushId);
                if (brush)
                {
                    EditorGUILayout.BeginHorizontal();
                    GUILayoutUtility.GetRect(1, 1, GUILayout.Width(Tileset.VisualTileSize.x), GUILayout.Height(Tileset.VisualTileSize.y));
                    TilesetEditor.DoGUIDrawTileFromTileData(GUILayoutUtility.GetLastRect(), brush.GetAnimTileData(), Tileset, brush.GetAnimUV());
                    GUILayout.Label("(" + brush.name + ":" + brush.GetType().Name + ")", EditorStyles.boldLabel);
                    EditorGUILayout.EndHorizontal();

                    if (!m_brushEditor || m_brushEditor.target != brush)
                    {
                        m_brushEditor = TilesetBrushEditor.CreateEditor(brush) as TilesetBrushEditor;
                    }
                    (m_brushEditor as TilesetBrushEditor).DoInspectorGUI();
                }
            }
            else
            {
                bool isMultiselection = Tileset.TileSelection != null;
                Tile selectedTile     = isMultiselection ? Tileset.Tiles[(int)(Tileset.TileSelection.selectionData[0] & Tileset.k_TileDataMask_TileId)] : Tileset.SelectedTile;
                GUILayoutUtility.GetRect(1, 1, GUILayout.Width(Tileset.VisualTileSize.x), GUILayout.Height(Tileset.VisualTileSize.y));
                Rect tileUV = selectedTile.uv;
                GUI.color = Tileset.BackgroundColor;
                GUI.DrawTextureWithTexCoords(GUILayoutUtility.GetLastRect(), EditorGUIUtility.whiteTexture, tileUV, true);
                GUI.color = Color.white;
                GUI.DrawTextureWithTexCoords(GUILayoutUtility.GetLastRect(), Tileset.AtlasTexture, tileUV, true);

                if (isMultiselection)
                {
                    EditorGUILayout.LabelField("* Multi-selection Edition", EditorStyles.boldLabel);
                }
                EditorGUI.BeginChangeCheck();

                selectedTile.autilingGroup = TilesetEditor.DoGroupFieldLayout(Tileset, "Group", selectedTile.autilingGroup);

                if (EditorGUI.EndChangeCheck())
                {
                    Undo.RecordObject(Tileset, "Tile Autotiling Data Changed");
                    if (isMultiselection)
                    {
                        for (int i = 0; i < Tileset.TileSelection.selectionData.Count; ++i)
                        {
                            Tile tile = Tileset.Tiles[(int)(Tileset.TileSelection.selectionData[i] & Tileset.k_TileDataMask_TileId)];
                            tile.autilingGroup = selectedTile.autilingGroup;
                        }
                    }
                    EditorUtility.SetDirty(Tileset);
                }
            }
        }