Skip to content

Commit d27b278

Browse files
committed
Auto-Updater toggle in FBX Export Settings
1 parent bc06dff commit d27b278

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ public override void OnInspectorGUI() {
5050
exportSettings.centerObjects
5151
);
5252

53+
exportSettings.autoUpdaterEnabled = EditorGUILayout.Toggle(
54+
new GUIContent("Auto-Updater:",
55+
"Automatically updates prefabs with new fbx data that was imported."),
56+
exportSettings.autoUpdaterEnabled
57+
);
58+
5359
GUILayout.BeginHorizontal();
5460
EditorGUILayout.LabelField(new GUIContent("Export Format:", "Export the FBX file in the standard binary format." +
5561
" Select ASCII to export the FBX file in ASCII format."), GUILayout.Width(LabelWidth - FieldOffset));
@@ -424,6 +430,7 @@ public static string[] DCCVendorLocations
424430
// Note: default values are set in LoadDefaults().
425431
public bool mayaCompatibleNames = true;
426432
public bool centerObjects = true;
433+
public bool autoUpdaterEnabled = true;
427434
public bool launchAfterInstallation = true;
428435
public bool HideSendToUnityMenu = true;
429436
public int ExportFormatSelection;
@@ -456,6 +463,7 @@ protected override void LoadDefaults()
456463
{
457464
mayaCompatibleNames = true;
458465
centerObjects = true;
466+
autoUpdaterEnabled = true;
459467
launchAfterInstallation = true;
460468
HideSendToUnityMenu = true;
461469
ExportFormatSelection = 0;

Assets/FbxExporters/Editor/FbxPrefabAutoUpdater.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ public static bool MayHaveFbxPrefabToFbxAsset(string prefabPath,
8181

8282
static void OnPostprocessAllAssets(string [] imported, string [] deleted, string [] moved, string [] movedFrom)
8383
{
84+
// Do not start if Auto Updater is disabled in FBX Exporter Settings
85+
if (!FbxExporters.EditorTools.ExportSettings.instance.autoUpdaterEnabled)
86+
{
87+
return;
88+
}
89+
8490
//Debug.Log("Postprocessing...");
8591

8692
// Did we import an fbx file at all?

0 commit comments

Comments
 (0)