Skip to content

Commit cb97d07

Browse files
author
AJubrey
committed
[REMOVED] my new function
[CHANGED] set the default values for the settings at declaration, this fixes the problem we were having and is simpler than my solution
1 parent 36ad83b commit cb97d07

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,10 @@ public static string[] DCCVendorLocations {
330330
}
331331

332332
// Note: default values are set in LoadDefaults().
333-
public bool mayaCompatibleNames;
334-
public bool centerObjects;
335-
public bool launchAfterInstallation;
336-
public bool HideSendToUnityMenu;
333+
public bool mayaCompatibleNames = true;
334+
public bool centerObjects = true;
335+
public bool launchAfterInstallation = true;
336+
public bool HideSendToUnityMenu = true;
337337
public int ExportFormatSelection;
338338

339339
public string IntegrationSavePath;
@@ -1024,7 +1024,6 @@ protected virtual void Load()
10241024
try {
10251025
var fileData = System.IO.File.ReadAllText(filePath);
10261026
EditorJsonUtility.FromJsonOverwrite(fileData, s_Instance);
1027-
checkForNewVariables(fileData);
10281027
} catch(Exception xcp) {
10291028
// Quash the exception and take the default settings.
10301029
Debug.LogException(xcp);
@@ -1033,19 +1032,6 @@ protected virtual void Load()
10331032
}
10341033
}
10351034

1036-
/// <summary>
1037-
/// Check the FBXSettings for any variables we don't know about yet. (in case we are using a new version of the importer)
1038-
/// We'll want to update this with any new significant UI options.
1039-
/// </summary>
1040-
/// <param name="FileData"></param>
1041-
private void checkForNewVariables(string FileData)
1042-
{
1043-
if (!FileData.Contains("HideSendToUnityMenu"))
1044-
{
1045-
ExportSettings.instance.HideSendToUnityMenu = true;
1046-
}
1047-
}
1048-
10491035
protected virtual void Save(bool saveAsText)
10501036
{
10511037
if (s_Instance == null)

0 commit comments

Comments
 (0)