private void CreateModeUI(float halfWidth)
        {
            EditorGUILayout.BeginVertical(BoxStyle, GUILayout.MaxWidth(halfWidth * 2 + ColumnGap + ((DataHolder.IsWindow) ? 0 : LeftMarginInspector)));
            halfWidth -= (DataHolder.IsWindow) ? BoxMargin : BoxMargin * 0.5f;

            EditorGUILayout.BeginHorizontal(RowStyle);
            EditorGUILayout.BeginVertical(LeftColumnFoldoutStyle, GUILayout.MaxWidth(halfWidth + ((DataHolder.IsWindow) ? 0 : LeftMarginInspector)));
            EditorGUILayout.BeginHorizontal(RowStyle);

            UIData.ModeCategory = EditorGUILayout.Foldout(UIData.ModeCategory, "Mode", true, FoldoutStyle);

            bool isDisabled = EditorData.Grids[0].ReadOnly;

            using (new EditorGUI.DisabledScope(isDisabled))
            {
                EditorGUI.BeginChangeCheck();
                ModeData.Mode = (DistributionMode)EditorGUILayout.EnumPopup(ModeData.Mode, PopupStyle);
                if (EditorGUI.EndChangeCheck())
                {
                    EditorData.UpdateVisualMode(ModeData);
                    SceneView.RepaintAll();
                }

                EditorGUILayout.EndHorizontal();
                EditorGUILayout.EndVertical();
            }
            EditorGUILayout.BeginVertical(RightColumnStyle, GUILayout.MaxWidth(halfWidth));
            ModeData.RealtimePreview = EditorGUILayout.Toggle("Realtime preview:", ModeData.RealtimePreview, ToggleStyle);
            EditorGUILayout.EndVertical();
            EditorGUILayout.EndHorizontal();

            using (new EditorGUI.DisabledScope(isDisabled))
            {
                if (UIData.ModeCategory)
                {
                    CreateModeSpecificUI(halfWidth);
                }
            }

            EditorGUILayout.EndVertical();

            GUILayout.Label("", GUI.skin.horizontalSlider);
        }