Skip to content

Commit b37d6b4

Browse files
author
AJubrey
committed
[CHANGED] now using a const instead of a magic number for the offset used in the ui
1 parent e8f383b commit b37d6b4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public class ExportSettingsEditor : UnityEditor.Editor {
1313
const float LabelWidth = 130;
1414
const float SelectableLabelMinWidth = 90;
1515
const float BrowseButtonWidth = 25;
16+
const float FieldOffset = 17;
1617

1718
public override void OnInspectorGUI() {
1819
ExportSettings exportSettings = (ExportSettings)target;
@@ -51,7 +52,7 @@ public override void OnInspectorGUI() {
5152

5253
GUILayout.BeginHorizontal();
5354
EditorGUILayout.LabelField(new GUIContent("Export Format:", "Export the FBX file in the standard binary format." +
54-
" Select ASCII to export the FBX file in ASCII format."), GUILayout.Width(LabelWidth - 17));
55+
" Select ASCII to export the FBX file in ASCII format."), GUILayout.Width(LabelWidth - FieldOffset));
5556
exportSettings.ExportFormatSelection = EditorGUILayout.Popup(exportSettings.ExportFormatSelection, new string[]{"Binary", "ASCII"});
5657
GUILayout.EndHorizontal();
5758

@@ -63,7 +64,7 @@ public override void OnInspectorGUI() {
6364
GUILayout.BeginHorizontal ();
6465
EditorGUILayout.LabelField(new GUIContent (
6566
"Export Path:",
66-
"Relative path for saving Model Prefabs."), GUILayout.Width(LabelWidth - 17));
67+
"Relative path for saving Model Prefabs."), GUILayout.Width(LabelWidth - FieldOffset));
6768

6869
var pathLabel = ExportSettings.GetRelativeSavePath();
6970
if (pathLabel == ".") { pathLabel = "(Assets root)"; }
@@ -105,7 +106,7 @@ public override void OnInspectorGUI() {
105106
GUILayout.BeginHorizontal ();
106107
EditorGUILayout.LabelField(new GUIContent (
107108
"Integrations Path:",
108-
"Installation path for 3D application integrations."), GUILayout.Width(LabelWidth - 17));
109+
"Installation path for 3D application integrations."), GUILayout.Width(LabelWidth - FieldOffset));
109110

110111
var IntegrationsPathLabel = ExportSettings.GetIntegrationSavePath();
111112
EditorGUILayout.SelectableLabel(IntegrationsPathLabel,
@@ -139,7 +140,7 @@ public override void OnInspectorGUI() {
139140
GUILayout.BeginHorizontal ();
140141
EditorGUILayout.LabelField(new GUIContent (
141142
"3D Application:",
142-
"Select the 3D Application for which you would like to install the Unity integration."), GUILayout.Width(LabelWidth - 17));
143+
"Select the 3D Application for which you would like to install the Unity integration."), GUILayout.Width(LabelWidth - FieldOffset));
143144

144145
// dropdown to select Maya version to use
145146
var options = ExportSettings.GetDCCOptions();

0 commit comments

Comments
 (0)