public override void OnPreviewSettings() { const int itemCount = 3; var width = EditorGUIUtility.currentViewWidth / (itemCount * 2 + 3); EditorGUIUtility.labelWidth = width; EditorGUIUtility.fieldWidth = width; labelContent = (BulletStormEditorUtil.LabelContent)EditorGUILayout.EnumPopup("Label content", labelContent); EditorGUI.BeginChangeCheck(); Preferences._.shapePreviewMesh = EditorGUILayout.ObjectField(Preferences._.shapePreviewMesh, typeof(Mesh), false) as Mesh; Preferences._.shapePreviewMaterial = EditorGUILayout.ObjectField(Preferences._.shapePreviewMaterial, typeof(Material), false) as Material; if (EditorGUI.EndChangeCheck()) { Preferences.ApplyChanges(); } }