Skip to content

Commit c6c676b

Browse files
committed
fix compile error from AssetSettingsProvider
1 parent 1decf54 commit c6c676b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

com.unity.formats.fbx/Editor/FbxExportSettings.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ static SettingsProvider CreateFbxExportSettingsProvider()
242242

243243
var provider = AssetSettingsProvider.CreateProviderFromObject(
244244
"Project/Fbx Export", ExportSettings.instance, GetSearchKeywordsFromGUIContentProperties(typeof(Style)));
245+
#if UNITY_2019_1_OR_NEWER
245246
provider.inspectorUpdateHandler += () =>
246247
{
247248
if (provider.settingsEditor != null &&
@@ -250,6 +251,16 @@ static SettingsProvider CreateFbxExportSettingsProvider()
250251
provider.Repaint();
251252
}
252253
};
254+
#else
255+
provider.activateHandler += (searchContext, rootElement) =>
256+
{
257+
if (provider.settingsEditor != null &&
258+
provider.settingsEditor.serializedObject.UpdateIfRequiredOrScript())
259+
{
260+
provider.Repaint();
261+
}
262+
};
263+
#endif // UNITY_2019_1_OR_NEWER
253264
return provider;
254265
}
255266

0 commit comments

Comments
 (0)